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
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Query for list of logins

Author  Topic 

WindChaser
Posting Yak Master

225 Posts

Posted - 2013-11-20 : 15:05:37
Hi folks,

Just want to know if there's any way to create a Select * From query in order to get all the logins.

Thanks.

Mike

WindChaser
Posting Yak Master

225 Posts

Posted - 2013-11-20 : 15:27:16
Darn, found it right after posting. Solution: Select * from Master.sys.Syslogins.

Thanks all.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2013-11-20 : 15:58:59
If you are using SQL Server 2012, you should be querying sys.server_principals. syslogins was for SQL Server 2000 and earlier and is still available for backwards compatibility only. It's been deprecated for many years.

Here's the mapping for deprecated system tables: http://technet.microsoft.com/en-us/library/ms187997.aspx

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -