April 10, 2012 at 3:03 pm
Hello,
I'm able to login to a database instance using windows authentication and able to access
any objects/any database in that database instance.
But I do not see my user id under Security -> Logins.
Question 1: I'm wondering how I'm ble to login to the database instance?
Question 2: How do I verify if a user for my accound exists in the database instance or not?
Thanks!
April 10, 2012 at 3:08 pm
is your windows user part of a domain admin group? or some group that has the access you are seeing in the database? only way that would be possible.
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 10, 2012 at 3:09 pm
you must be a member of a windows group that has SQL access.
select * from sys.database_principals or exec sp_helpuser
---------------------------------------------------------------------
April 10, 2012 at 3:30 pm
Thanks!
When I execute SELECT USER_NAME(), I get the result as guest.
Question 1:
How do I find out if my windows user id is a part of domain admin group (or) windows group?
Question 2:
When I run exec sp_helpuser, I get the below result:
UserName RoleNameLoginNameDefDBNameDefSchemaNameUserIDSID
dbo db_ownersa master dbo 1 0x01
guest public NULL NULL guest 2 0x00
INFORMATION_SCHEMApublic NULL NULL NULL 3 NULL
sys public NULL NULL NULL 4 NULL
Question 3:
What should I look for in select * from sys.database_principals
April 10, 2012 at 3:56 pm
anonymous2009 (4/10/2012)
Thanks!When I execute SELECT USER_NAME(), I get the result as guest.
you are getting into database as guest user then, this is one of the users listed below. This shows you do not have sysadmin rights else it would return dbo.
Question 1:
How do I find out if my windows user id is a part of domain admin group (or) windows group?
don't know of a SQL way so I would ask whoever administers active directory 🙂
Question 2:
When I run exec sp_helpuser, I get the below result:
UserName RoleNameLoginNameDefDBNameDefSchemaNameUserIDSID
dbo db_ownersa master dbo 1 0x01
guest public NULL NULL guest 2 0x00
INFORMATION_SCHEMApublic NULL NULL NULL 3 NULL
sys public NULL NULL NULL 4 NULL
Question 3:
What should I look for in select * from sys.database_principals
NO logins are explicitly defined as users to this database, sys.database_principals would return the same users.
---------------------------------------------------------------------
April 10, 2012 at 4:56 pm
Execute xp_logininfo 'domain\youracountlogin', 'all'
It will tell you all the paths into the server for your account and if it is user or admin permissions.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply