List all the Databases on a SQL Server
人气:0
List all the Databases on a SQL Server.
Supported Platforms
SQL Server 2000
Yes
Script Code
strDBServerName = "."
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName
Set colDatabases = objSQLServer.Databases
For Each objDatabase In colDatabases
WScript.Echo objDatabase.Name
Next
Supported Platforms
SQL Server 2000
Yes
Script Code
strDBServerName = "."
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName
Set colDatabases = objSQLServer.Databases
For Each objDatabase In colDatabases
WScript.Echo objDatabase.Name
Next
加载全部内容