List all the Databases on a SQL Server_javascript技巧
程序员文章站
2022-03-21 08:32:57
...
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学习总结】——this关键字的指向
下一篇: FFmpeg 的介绍与使用
推荐阅读
-
sql 查询结果合并union all用法_数据库技巧
-
sql 查询结果合并union all用法_数据库技巧
-
sql 查询结果合并union all用法_数据库技巧
-
sql 查询结果合并union all用法_数据库技巧
-
List all the Databases on a SQL Server_javascript技巧
-
Stop SQL Server_javascript技巧
-
Sample script that displays all of the users in a given SQL Server DB_javascript技巧
-
Stop SQL Server_javascript技巧
-
List all the Databases on a SQL Server_javascript技巧
-
Sample script that displays all of the users in a given SQL Server DB_javascript技巧