DisplaySQLServerLoginMode.
SupportedPlatforms
SQLServer2000
Yes
ScriptCode
SQLDMOSecurity_Integrated=1
SQLDMOSecurity_Mixed=2
SQLDMOSecurity_Normal=0
SQLDMOSecurity_Unknown=9
strDBServerName="."
SetobjSQLServer=CreateObject("SQLDMO.SQLServer")
SelectCaseobjSQLServer.ServerLoginMode(strDBServerName)
CaseSQLDMOSecurity_Integrated
WScript.Echo"LoginMode:AllowWindowsAuthenticationonly."
CaseSQLDMOSecurity_Mixed
WScript.Echo"LoginMode:AllowWindowsAuthenticationorSQLServerAuthentication."
CaseSQLDMOSecurity_Normal
WScript.Echo"LoginMode:AllowSQLServerAuthenticationonly."
CaseSQLDMOSecurity_Unknown
WScript.Echo"LoginMode:Securitytypeunknown."
EndSelect
【Display SQL Server Login Mode】相关文章:
★ JavaScript正则表达式中的ignoreCase属性使用详解