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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Query for list of logins
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

225 Posts

Posted - 11/20/2013 :  15:05:37  Show Profile  Reply with Quote
Hi folks,

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



Posting Yak Master

225 Posts

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

Thanks all.
Go to Top of Page

Almighty SQL Goddess

38200 Posts

Posted - 11/20/2013 :  15:58:59  Show Profile  Visit tkizer's Homepage  Reply with Quote
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:

Tara Kizer
SQL Server MVP since 2007
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000