SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
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  

WindChaser
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.

Thanks.

Mike

WindChaser
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

tkizer
Almighty SQL Goddess

USA
36984 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
http://weblogs.sqlteam.com/tarad/
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.06 seconds. Powered By: Snitz Forums 2000