检查SQL身份验证 [英] Check SQL Authentication

查看:72
本文介绍了检查SQL身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设在LAN和SQL Server 2000中有四台计算机安装在除computer4之外的每台计算机中.
即->
1> SQL Server 2000将在混合模式下配置Sql身份验证,而computer1中没有密码.
2> SQL Server 2000将在混合模式下使用计算机2中的密码配置Sql身份验证.
3> SQL Server 2000将在computer3中配置Windows身份验证模式.

如何通过编码从computer4检查computer1的身份验证模式? 每台计算机都安装Windows XP Service Pack2 Professional,并且未设置密码..


请帮助我解决这个基本问题........

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

推荐答案

通过执行以下存储过程,您可以在以下位置获取/检查SQL Server身份验证: XP模式:

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

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]


这篇关于检查SQL身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆