January 21, 2010 at 5:49 am
Dear All,
is there any way to run qurey tell me the users stored in the database.
thanks alot.
January 21, 2010 at 6:17 am
you can use the old backwards compatible sysusers view or the newer sys.sysusers view in 2005 and above:
select * from sysusers
select * from sys.sysusers
that is different fromt he logins that exist on the server:
select * from sys.syslogins
Lowell
January 21, 2010 at 7:05 am
Lowell (1/21/2010)
you can use the old backwards compatible sysusers view or the newer sys.sysusers view in 2005 and above:
sysusers and sys.sysusers refer to the same view, a backward compatibility view included, but deprecated. (dbo.sysusers works too, and refers to the same view.)
The 2005 replacements is sys.database_principals
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 21, 2010 at 7:06 am
Thanks Gail!
Lowell
January 22, 2010 at 12:51 am
Yaa !
There two System Views
1. sys.Server_Principals for Logins (saved in master database)
2. sys.Database_Principals for Users (saved in each user database)
Ram
MSSQL DBA
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply