List the Stored Procedures in a SQL Server database_图象特效
程序员文章站
2022-03-17 07:54:20
...
List the Stored Procedures in a SQL Server database.
Supported Platforms
SQL Server 2000
Yes
Script Code
strDBServerName = "."
strDBName = "Northwind"
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName
Set objDB = objSQLServer.Databases(strDBName)
Set colStoredProcedures = objDB.StoredProcedures
For Each objStoredProcedure In colStoredProcedures
WScript.Echo "SP Name: " & objStoredProcedure.Name
Next
Supported Platforms
SQL Server 2000
Yes
Script Code
strDBServerName = "."
strDBName = "Northwind"
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName
Set objDB = objSQLServer.Databases(strDBName)
Set colStoredProcedures = objDB.StoredProcedures
For Each objStoredProcedure In colStoredProcedures
WScript.Echo "SP Name: " & objStoredProcedure.Name
Next