SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Questions about db_owner role.


Questions about db_owner role.

Author
Message
KP-249943
KP-249943
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 262
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?
sturner
sturner
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4894 Visits: 3259
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.
KP-249943
KP-249943
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 262
I get the same result as my co-worker.
george sibbald
george sibbald
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23652 Visits: 13698
run 'exec sp_helpuser ' in the database, what does that return?

---------------------------------------------------------------------
KP-249943
KP-249943
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 262
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.
2 Tim 3:16
2 Tim 3:16
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1807 Visits: 1547
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
SanjayAttray
SanjayAttray
SSCertifiable
SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)

Group: General Forum Members
Points: 5625 Visits: 1619
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.
george sibbald
george sibbald
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23652 Visits: 13698
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.

---------------------------------------------------------------------
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search