List all the Databases on a SQL Server
时间:2020-11-08 12:34:34|栏目:JavaScript代码|点击: 次
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
栏 目:JavaScript代码
下一篇:写的htc的数据表格
本文标题:List all the Databases on a SQL Server
本文地址:http://www.codeinn.net/misctech/20388.html