Results 1 to 3 of 3

Thread: SQL Server logins

  1. #1
    Join Date
    Mar 2006
    Posts
    127

    SQL Server logins

    Hello All,

    I have named logins and generic logins. For example, jsomebody and test. I need to write a query to exclude named logins. Not sure how to do it. Any ideas?

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Are they both SQL Server logins?. If jsomebody is Windows Login then you can query server_principal view for type_desc='WINDOWS LOGIN'

    If it is not windows login then you have to exclude generic logins by putting in NOT IN () clause.

  3. #3
    Join Date
    Sep 2002
    Posts
    5,938
    Sql doesn't know if the login is generic or not but you know, so NOT IN () or IN () clause is your best bet as skhanal said.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •