Click here to Skip to main content
15,885,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Suppose four computers have in LAN & SQL Server 2000 is install in every computer except computer4.
i.e.->
1> SQL Server 2000 is to be configure Sql Authentication in mixed mode without password in computer1.
2> SQL Server 2000 is to be configure Sql Authentication in mixed mode with password in computer2.
3> SQL Server 2000 is to be configure Windows Authentication mode in computer3.

How will i check Authentication mode of computer1 from computer4 through coding????
Every computers are install Windows XP service Pack2 Professional and not set password..


Please help me at any how this essential problem........
Posted

1 solution

By executing the below stored procedure, you can get/check SQL server authentication in XP mode:

SQL
DECLARE @AuthenticationMode INT
EXEC master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE',
N'Software\Microsoft\MSSQLServer\MSSQLServer',
N'LoginMode', @AuthenticationMode OUTPUT

SELECT CASE @AuthenticationMode
WHEN 1 THEN 'Windows Authentication'
WHEN 2 THEN 'Windows and SQL Server Authentication'
ELSE 'Unknown'
END as [Authentication Mode]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900