DiggerSite

SQL Server – Get all Login Accounts Using T-SQL Query – SQL Logins, Windows Logins, Windows Groups | SqlServerZest.com

Earlier today I was required to pull the list of all SQL Login Accounts, Windows Login Accounts and Windows Group Login Accounts (basically all the Logins along with the Account Type of the Login) …

Источник: SQL Server – Get all Login Accounts Using T-SQL Query – SQL Logins, Windows Logins, Windows Groups | SqlServerZest.com

 

Раньше или позже у любого DBA возникает животрепещущий вопрос- кто именно из пользователей заведен на сервере и что он там может делать? Мир не без добрых людей, кое-что посоветовали (хотя для работы придется докрутить)

 

SELECT name AS Login_Name, type_desc AS Account_Type
FROM sys.server_principals 
WHERE TYPE IN ('U', 'S', 'G')
and name not like '%##%'
ORDER BY name, type_desc

 

12 comments for “SQL Server – Get all Login Accounts Using T-SQL Query – SQL Logins, Windows Logins, Windows Groups | SqlServerZest.com

  1. 30.06.2016 at 13:21

    Hello there, I found your site by means of Google while looking for a related subject, your website came up, it seems great. I’ve bookmarked it in my google bookmarks.
    Hi there, simply was aware of your blog via Google, and found that it’s truly informative. I am going to be careful for brussels. I’ll be grateful in the event you continue this in future. A lot of folks might be benefited from your writing. Cheers!

  2. 05.07.2016 at 09:35

    Appreciation to my father who told me regarding this blog, this webpage is genuinely remarkable.

  3. 06.07.2016 at 21:58

    I was able to find good info from your content.

  4. 11.07.2016 at 09:31

    I have been browsing online greater than three hours lately, but I never discovered any attention-grabbing article like yours. It’s lovely value enough for me. In my opinion, if all web owners and bloggers made good content as you did, the web shall be much more useful than ever before.

  5. 17.07.2016 at 05:46

    I am now not positive the place you are getting your info, but great topic. I needs to spend a while learning much more or understanding more. Thanks for great info I used to be in search of this info for my mission.

  6. 17.07.2016 at 23:07

    When someone writes an piece of writing he/she maintains the image of a user in his/her brain that how a user can know it. So that’s why this paragraph is outstdanding. Thanks!

  7. 18.07.2016 at 23:18

    Great blog here! Also your website lots up very fast! What host are you using? Can I get your affiliate link to your host? I desire my website loaded up as fast as yours lol

  8. 19.07.2016 at 05:05

    Thanks for one’s marvelous posting! I truly enjoyed reading it, you will be a great author. I will make certain to bookmark your blog and will eventually come back in the future. I want to encourage yourself to continue your great job, have a nice evening!

  9. 25.07.2016 at 11:01

    This is my first time visit at here and i am genuinely happy to read all at one place.

  10. 03.08.2016 at 20:53

    Its such as you read my mind! You seem to understand so much approximately this, such as you wrote the e-book in it or something. I feel that you could do with a few percent to force the message house a little bit, however instead of that, that is wonderful blog. An excellent read. I will certainly be back.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *