January 14, 2008 at 12:39 am
Hi,
Please could I have some help, I’m trying to find out about system tables
Well the syslogin and sysusers
Does on of them store Windows logins and does on store SQL logins?
Also is there a table that I can assess to get Active Directory Details/Logins.
And maybe map them to the SQL and Windows Logins.
Thanks
January 14, 2008 at 1:09 am
You can see all the logins on the server using the system view sys.server_principals. It's the 2005 replacement for syslogins.
SELECT * FROM sys.server_principals WHERE type IN ('u', 'S')
sysusers on SQL 2000 contained information about the database users (as opposed to the server logins) and is now replaced by sys.database_principals
SELECT * FROM sys.database_principals WHERE type IN ('u', 'S')
Hope that helps
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 14, 2008 at 1:14 am
The syslogins table stores server logins and the sysusers table stores the users of a database. They both contain a mix of Windows and SQL logins. I'm not sure what you mean by map AD logins to Windows logins as they are the same thing. You can't map a Windows login to a SQL login by definition, they are different. If you are looking to map server logins to database users then look at the sys.server_principals and sys.database_principals tables, joining on the SID.
January 14, 2008 at 1:18 am
Thanks Guys,
Much Appreciated.:)
January 14, 2008 at 1:21 am
You would like to map AD login i.e. you would like to use window login alongwith sql server login. The only option for this is use Mix mode security.
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply