This script will list all stored procedures that are calling the specified stored procedure.
Also could be used to find procedures that contain any specified expression or words.
Eve,
2002-05-01
This script will list all stored procedures that are calling the specified stored procedure.
Also could be used to find procedures that contain any specified expression or words.
if exists (select name from sysobjects where name = '_GetStoredProcs' and type = 'P') drop procedure _GetStoredProcs GO create proc _GetStoredProcs @Procname varchar(20) as /* This script will list all stored procedures that are calling the specified stored procedure. Also could be used to find procedures that contain any specified expression or words. Usage: exec _GetStoredProcs "test_proc" Created by E.Zadoyen 05/01/2002 */ declare @sqlstr varchar(200) select @sqlstr = 'SELECT DISTINCT"' + @Procname +'" "TEST", object_name(id) "Exists In Proc" FROM syscomments WHERE charindex (" '+ ltrim(@procname) + '",text )<>0 AND object_name(id) <> "' + LTRIM(RTRIM(@procname)) + '"' exec(@sqlstr) return
You rated this post out of 5. Change rating
Detect SQL Server Instance(s) using reg.exe from the resource kit, just pass the host name! (and make sure reg.exe from the resouce kit is in the ../tools/bin directory. SS2k Only.Enjoy!
2002-04-23
1,031 reads
Ever want to display (and edit) ASP code from the original .asp file? (like PHP's PHPInfo() function).To setup: * Just create a .asp with SQL Server connectivity. * Change @IISHostNameWWWPath to match your servername -OR- if SQL Server is on the same machine, use the next line instead. (see […]
2002-04-22
522 reads
This procedure will return useful columns information for VB developers. It shows column name, data type, size, vbtype, checktable (refferenced table) and flags: NoNull, IsIdentity, IsPK.Calling sample: mysp_columns 'customers'
2002-04-19
678 reads
Ever need to write reports out to a folder? I have found that creating output files are SA-WEET! (and easy too) The sample script uses BCP to create an HTML file.This process works well for reports that need to be generated nightly and take too long to run in real time. Use an SMTP mail […]
2002-04-18
4,207 reads
This short and simple script is a very fast way to count the rows in all your indexed tables. I ran it against a 2-gigabyte database containing large tables (some with over a million rows!), and it returned results in under a second.
2002-03-12
2,827 reads