Wednesday, March 21, 2012

Mixed Mode vs. Windows Authentication

I am trying to create a query that can determine if a user id is using mixed mode/windows/both authentication. I need to do this so that it can run on both sql server 2000 and 2005, meaning I can't use any of the sys.* views. Is there a single query could use for both systems?
-Kyle

Hi kschlap,

there is no method for your issue.

but maybe you can try to build a view to select cross these 2 servers.

create view v_loginid_info

as

select 'servname'='mssql2k', loginid

from mssql2k.master.dbo.sysprocesses

union all

select 'servname'='mssql2k05', loginid

from mssql2k05.master.sys.sysprocess

try to think about.

hoping this can help you.

Best Regrads,

Hunt.

|||I have found the query...

select name, is_policy_checked
from sys.sql_logins

When I use this query, it doesn't pick up the windows authenticated users. Is there a way to get it to pick up all users?
-Kyle|||

How about something like this:

select name, isntuser from syslogins

isntuser=1 means Windows authentication

isntuser=0 means SQL Server authentication

Ben

sql

No comments:

Post a Comment