最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
列出数据库内所有的Trigger,Store Procedure
时间:2022-06-30 10:33:18 编辑:袖梨 来源:一聚教程网
<%
dbname = "databasename"
ConnStr = "provider=SQLOLEDB;network=DBMSSOCN;"
ConnStr = ConnStr & "uid=;pwd=;server="
ConnStr = ConnStr & " Address>;database=" & dbname
set Conn = server.createobject("adodb.connection")
Conn.Open ConnStr
set rs = Conn.execute("SELECT name FROM sysobjects WHERE xtype='TR'") '把TR换成p就可列出系统SP
'<列出用户自建SP>set rs = Conn.execute("SELECT name FROM sysobjects WHERE xtype='P' AND ObjectProperty(ID,'IsMSShipped')=0")
do while not rs.eof
response.write("
" & rs(0) & "
")
set rs2 = Conn.execute("EXEC sp_helptext '" & rs(0) & "'")
do while not rs2.eof
response.write(rs2(0) & "
")
rs2.movenext
loop
rs.movenext
loop
rs.close: set rs = nothing
Conn.Close: set Conn = nothing
%>
dbname = "databasename"
ConnStr = "provider=SQLOLEDB;network=DBMSSOCN;"
ConnStr = ConnStr & "uid=
ConnStr = ConnStr & "
set Conn = server.createobject("adodb.connection")
Conn.Open ConnStr
set rs = Conn.execute("SELECT name FROM sysobjects WHERE xtype='TR'") '把TR换成p就可列出系统SP
'<列出用户自建SP>set rs = Conn.execute("SELECT name FROM sysobjects WHERE xtype='P' AND ObjectProperty(ID,'IsMSShipped')=0")
do while not rs.eof
response.write("
" & rs(0) & "
")
set rs2 = Conn.execute("EXEC sp_helptext '" & rs(0) & "'")
do while not rs2.eof
response.write(rs2(0) & "
")
rs2.movenext
loop
rs.movenext
loop
rs.close: set rs = nothing
Conn.Close: set Conn = nothing
%>
相关文章
- 《潜行者2:切尔诺贝利之心》游戏车辆使用推荐 11-22
- 《潜行者2:切尔诺贝利之心》挡路的特异点处理方法介绍 11-22
- 《潜行者2:切尔诺贝利之心》开局获得满强AK方法介绍 11-22
- 《潜行者2:切尔诺贝利之心》军用防弹背心获得方法介绍 11-22
- 《潜行者2:切尔诺贝利之心》防毒面具获得方法介绍 11-22
- 《潜行者2:切尔诺贝利之心》开局捡尸体摸尸注意事项分享 11-22