Display SQL Server Login Mode_javascript技巧
程序员文章站
2022-04-01 23:00:48
...
Display SQL Server Login Mode.
Supported Platforms
SQL Server 2000
Yes
Script Code
SQLDMOSecurity_Integrated = 1
SQLDMOSecurity_Mixed = 2
SQLDMOSecurity_Normal = 0
SQLDMOSecurity_Unknown = 9
strDBServerName = "."
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
Select Case objSQLServer.ServerLoginMode(strDBServerName)
Case SQLDMOSecurity_Integrated
WScript.Echo "Login Mode: Allow Windows Authentication only."
Case SQLDMOSecurity_Mixed
WScript.Echo "Login Mode: Allow Windows Authentication or SQL Server Authentication."
Case SQLDMOSecurity_Normal
WScript.Echo "Login Mode: Allow SQL Server Authentication only."
Case SQLDMOSecurity_Unknown
WScript.Echo "Login Mode: Security type unknown."
End Select
Supported Platforms
SQL Server 2000
Yes
Script Code
SQLDMOSecurity_Integrated = 1
SQLDMOSecurity_Mixed = 2
SQLDMOSecurity_Normal = 0
SQLDMOSecurity_Unknown = 9
strDBServerName = "."
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
Select Case objSQLServer.ServerLoginMode(strDBServerName)
Case SQLDMOSecurity_Integrated
WScript.Echo "Login Mode: Allow Windows Authentication only."
Case SQLDMOSecurity_Mixed
WScript.Echo "Login Mode: Allow Windows Authentication or SQL Server Authentication."
Case SQLDMOSecurity_Normal
WScript.Echo "Login Mode: Allow SQL Server Authentication only."
Case SQLDMOSecurity_Unknown
WScript.Echo "Login Mode: Security type unknown."
End Select
推荐阅读
-
SQL Server2005下的安全操作技巧分享
-
sql server查询时间技巧分享
-
『Word2007技巧』使用 ODBC 驱动程序从 SQL Server 2000 或 2005 数据库中导入数据
-
『Word2007技巧』从 SQL Server 数据库中导入数据
-
深入学习SQL Server聚合函数算法优化技巧
-
sql server建库、建表、建约束技巧
-
SQL Server优化技巧——如何避免查询条件OR引起的性能问题
-
SQL Server查看login所授予的具体权限问题
-
SQL Server存储过程Return、output参数及使用技巧
-
Oracle SqlPlus设置Login.sql的技巧