欢迎来到福编程网,本站提供各种互联网专业知识!

List the Stored Procedures in a SQL Server database

发布时间:2007-06-20 作者: 来源:转载
ListtheStoredProceduresinaSQLServerdatabase.SupportedPlatformsSQLServer2000YesScriptCodestrDBServerName="."strDBName="Northwind"SetobjSQLServer=CreateObject("SQLDMO.SQLServer")objSQLServer.LoginSecure=TrueobjSQLServer.ConnectstrDBServ

ListtheStoredProceduresinaSQLServerdatabase.

SupportedPlatforms

SQLServer2000
Yes


ScriptCode

strDBServerName="."
strDBName="Northwind"

SetobjSQLServer=CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure=True
objSQLServer.ConnectstrDBServerName

SetobjDB=objSQLServer.Databases(strDBName)
SetcolStoredProcedures=objDB.StoredProcedures
ForEachobjStoredProcedureIncolStoredProcedures
WScript.Echo"SPName:"&objStoredProcedure.Name
Next

相关推荐