July 28, 2009 at 9:25 am
Hi,
I am using SQL Server 2005 (SP3).
I created a new login via SSMS. I went to Security-->Logins-->New Login. I created a new login called newUser with a password.
Then I went to my User Database called MyDB. I went to Security-->Users-->New User. Under Login name and User Name I typed in newUser. Under the Database Role Membership I check db_owner.
Then I gave this UserID and Password to my co-worker at work. When my co-worker uses SSMS and users newUser as the UserId and the correct password, in SSMS he is unable to see MyDB. He is also unable to create new Stored Procs etc. Why is that? Once he is the db_owner he should be able to do everything on this database (including DROP). I don't want to make newUser as the Owner.
Any ideas? tips?
July 28, 2009 at 9:36 am
Perhaps your co-worker is not logging in with that user id and password. He might be connecting with integrated security.
Why don't you log in yourself with that user and password and see what you get?
The probability of survival is inversely proportional to the angle of arrival.
July 28, 2009 at 1:14 pm
I get the same result as my co-worker.
July 28, 2009 at 1:18 pm
run 'exec sp_helpuser ' in the database, what does that return?
---------------------------------------------------------------------
July 30, 2009 at 8:50 am
I ran exec sp_helpuser 'newUser'
I got back UserName as newUser
GroupName as db_owner
LoginName as newUser
DefDBName as MyDB
DefSchemaName as dbo
UserId
SID
Please help.
July 31, 2009 at 8:36 am
Mayne the user didn't get matched up with the login.
Go to Security - Login and look at the porperties for the login and see if the user database is checked for dbo.
Tim White
July 31, 2009 at 9:02 am
2 Tim 3:16 (7/31/2009)
Mayne the user didn't get matched up with the login.Go to Security - Login and look at the porperties for the login and see if the user database is checked for dbo.
execute sp_change_users_login 'loginname','username'
SQL DBA.
August 1, 2009 at 4:20 pm
KP (7/30/2009)
I ran exec sp_helpuser 'newUser'I got back UserName as newUser
GroupName as db_owner
LoginName as newUser
DefDBName as MyDB
DefSchemaName as dbo
UserId
SID
Please help.
This looks correct.
You say this id cannot create stored procs etc but if it cannot even see the database how are you getting that far to test? Are you able to issue the use mydb command in a query window and switch to the database?
I suggest you run profiler as the id logs on and track what happens. Include errors and warnings in the trace. If its a permissions problem on some system object that will be the last command issued and the trace will stop there.
Post any erors you haave received if any because what you report so far does not add up.
---------------------------------------------------------------------
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply