作者:mobiledu2502940393 | 来源:互联网 | 2018-05-04 21:45
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