Display SQL Server Version Information_javascript技巧
程序员文章站
2022-03-16 22:28:59
...
Display SQL Server Version Information
Description
Display SQL Server Version Information.
Supported Platforms
SQL Server 2000
Yes
Script Code
strDBServerName = "."
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName
WScript.Echo "SQL Major Version: " & objSQLServer.VersionMajor
WScript.Echo "SQL Minor Version: " & objSQLServer.VersionMinor
WScript.Echo "SQL Version String: " & objSQLServer.VersionString
Description
Display SQL Server Version Information.
Supported Platforms
SQL Server 2000
Yes
Script Code
strDBServerName = "."
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName
WScript.Echo "SQL Major Version: " & objSQLServer.VersionMajor
WScript.Echo "SQL Minor Version: " & objSQLServer.VersionMinor
WScript.Echo "SQL Version String: " & objSQLServer.VersionString