SQL Server Forums
Profile | Register | 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
 New Topic  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

38073 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: http://technet.microsoft.com/en-us/library/ms187997.aspx

Tara Kizer
SQL Server MVP since 2007
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.03 seconds. Powered By: Snitz Forums 2000