Showing posts with label alli. Show all posts
Showing posts with label alli. Show all posts

Wednesday, March 21, 2012

How do I give a user access to SQL Server?

Hi all

I tried using my administrator account to add SQLServer as an ODBC Connection, but for some reason when it tries authenticating it fails and the reason is that the user is not trusted to use that connection. Yet on my account i've created on my domain works perfectly.

I've added a new user in SQL Enterprise manager, but i still get that error.

How do I set the user to be trusted to use the connection?

Any and as many assists on this would be great.

Kr33

[edit] - Hmm, actually, I may be misunderstanding the question. I'm going to move this question into the Data Access forum which hopefully can provide better support:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=87&SiteID=1

Sung

|||its better here in the Sql server security section|||

there are two types of login in SQL server

1. the NT login which is used when your server is configured

to use "windows Only" authentication

2. and The SQL server login which is used when your server is configured

to used mixed mode authentication. example of which is the SA login. this is usefull

if your accepting user that not authenticated through windows such as linux user

To configure you server to be on mixed mode authentication. open SQL Enterprise manager

expand the treeview until you reach the desired server. Right click the server. clcik on properties

clcik on security. Then choose "sql server and windows" in the authentication option

note that you can use SA only when you turn on this option

|||Whats your connection string ? If you are not sure about changing the authentication type, you can have a look at my screencasts on my site which will show you how to administer your SQL Server for the change of the authentication mode.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
sql

How do I get the UserID column value of the User that just has

Hello ML,
Thanks for the reply. May be I am using them in the back ground . All
I do is use controls in the front to get the job done. But I never had
a situation or need to customize these controls and hence had to look
into the aspnetdb database where to make changes inorder to accomplish
my task.
Like I said this is my first time that I have a need to grab the
UserId and push that into another table along with the DelaerShipID. So
I just needed some suggestions on how do I do it.
As a test I Executed the stored proce aspnet_Users_CreateUser and it
returns the @.UserId value here is the output from the Management
Studio...
****************************************
*********************
USE [aspnetdbTest]
GO
DECLARE @.return_value int,
@.UserId uniqueidentifier
EXEC @.return_value = [dbo].[aspnet_Users_CreateUser]
@.ApplicationId = '8203a4f9-995b-4506-aec0-075551d77d02',
@.UserName = N'TestUser',
@.IsUserAnonymous = false,
@.LastActivityDate = N'4/11/2006',
@.UserId = @.UserId OUTPUT
SELECT @.UserId as N'@.UserId'
SELECT 'Return Value' = @.return_value
GO
****************************************
***********************
and the output I got is the @.UserID
'303B2D60-788C-4F96-9930-7E5BA173D165'.
Now my question is :
To get this @.UserID value from the aspnetdb to my Business Layer what
event do I need to use in my code behind page?
Thanks
-LI'm sorry if I sounded harsh. There were no ulterior motives.
You'd better ask this in a more appropriate news group (depending on the
programming language used in your asp code-behind). Basically, you need to
trap the value being returned from the procedure in a local variable in your
asp method by invoking the SQL procedure appropriately. You need to declare
the UserId parameter as an output parameter and assign its value to the loca
l
variable. (Yes, it's obvious that I'm more at home in T-SQL.)
ML
http://milambda.blogspot.com/