Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Cannot see my user name

Author  Topic 

Muzokh
Starting Member

21 Posts

Posted - 2011-12-02 : 20:05:09
I am new in SQL Server and I am very confuse regarding users in sql server, I use windows authencation, I have 2 databases in my sql server, first one is adventureworks and second one is sales, I can see my user name under adventureworks database, but i cannot find my user name under sales database, please tell me why I can't see my user name in sales data and why I can see my user name in adventureworks database . thanks

namman
Constraint Violating Yak Guru

285 Posts

Posted - 2011-12-03 : 18:15:06
To access a db, the login must map to a user in that db. So if you can access objects in a db, you have a user in that db. By default, sys admin map to the dbo user.

Run this to see if your user name is in the db

exec sp_helpuser

Login and User in sql server are a bit confusing for the new one.
Go to Top of Page

Muzokh
Starting Member

21 Posts

Posted - 2011-12-04 : 03:42:34
Thanks fore the reply, I am unable to see my user in sales database, I double clickon my login name that is "zuhair-PC\zuhair" and under User Mapping , I find a check on sales database, could you please suggest me how can I add name in sales database.
Go to Top of Page

sandy123
Starting Member

14 Posts

Posted - 2011-12-04 : 09:29:39
Check if you can find the user name under database
Exec sp_helpuser or
expand sales database - Security - users- username

sandy
Go to Top of Page

Muzokh
Starting Member

21 Posts

Posted - 2011-12-04 : 17:22:33
Unable to find user name under sales database.
Go to Top of Page
   

- Advertisement -