I am maintaining an application where most of the business rules are in
Triggers, Stored Procedures and User Defined Functions. When a bug
arises, it can get very tedious to debug. Today for example, I wanted
to modify a function that was being called by a trigger. The problem
is that I don't want to change the function, for fear that it is being
called by one of the other SP's or triggers in the database (there are
hundreds of them)
Essentially, I need a tool that allows me to view where functions and
sp's are being referenced from. At the very least, I'd like to perform
a "full text search" in the database objects, so that let's say I have
a function named "fn_doSomething", I can search the schema for this
string and get all the places where it appears.
As you can see, I'm in the dark here. I've never worked on a system
where all business rules are at the database level. If you know of a
tool that does what I describe above, or anything else that would
facilitate my life, please let me know!
Thanks for your help,
Marc 5 4225
Not sure about 2005 but in 2000 use syscomments
SELECT *
FROM syscomments
WHERE TEXT LIKE '%<your function name>%'
Now add sysobjects to get the name of the stored procedure where your
function is called. If you are using QA instead of that awful thing in
2005, create a stored procedure in the master database add a shortcut
key sequence in QA, highlight the function name, press the shortcut and
all instances will magically appear.
Adrian ma********@gmail.com wrote:
I am maintaining an application where most of the business rules are in
Triggers, Stored Procedures and User Defined Functions. When a bug
arises, it can get very tedious to debug. Today for example, I wanted
to modify a function that was being called by a trigger. The problem
is that I don't want to change the function, for fear that it is being
called by one of the other SP's or triggers in the database (there are
hundreds of them)
Essentially, I need a tool that allows me to view where functions and
sp's are being referenced from. At the very least, I'd like to perform
a "full text search" in the database objects, so that let's say I have
a function named "fn_doSomething", I can search the schema for this
string and get all the places where it appears.
As you can see, I'm in the dark here. I've never worked on a system
where all business rules are at the database level. If you know of a
tool that does what I describe above, or anything else that would
facilitate my life, please let me know!
Thanks for your help,
Marc
Thanks Adrian,
Thanks for the reply. This is indeed helpful.
abc wrote:
Not sure about 2005 but in 2000 use syscomments
SELECT *
FROM syscomments
WHERE TEXT LIKE '%<your function name>%'
Now add sysobjects to get the name of the stored procedure where your
function is called. If you are using QA instead of that awful thing in
2005, create a stored procedure in the master database add a shortcut
key sequence in QA, highlight the function name, press the shortcut and
all instances will magically appear.
Adrian ma********@gmail.com wrote:
I am maintaining an application where most of the business rules are in
Triggers, Stored Procedures and User Defined Functions. When a bug
arises, it can get very tedious to debug. Today for example, I wanted
to modify a function that was being called by a trigger. The problem
is that I don't want to change the function, for fear that it is being
called by one of the other SP's or triggers in the database (there are
hundreds of them)
Essentially, I need a tool that allows me to view where functions and
sp's are being referenced from. At the very least, I'd like to perform
a "full text search" in the database objects, so that let's say I have
a function named "fn_doSomething", I can search the schema for this
string and get all the places where it appears.
As you can see, I'm in the dark here. I've never worked on a system
where all business rules are at the database level. If you know of a
tool that does what I describe above, or anything else that would
facilitate my life, please let me know!
Thanks for your help,
Marc
abc wrote:
SELECT *
FROM syscomments
WHERE TEXT LIKE '%<your function name>%'
Doesn't this miss instances where <your function nameis split
across two chunks of text?
You're right, Ed. For instance, if <function nameis referenced from
8 different places in a stored procedure, it will only return 1 result.
That's why I was asking about some sort of 3rd party tool that would
allow you to seasrch for a string, return all the instances where it's
found, and let you navigate across the results. Ideally, you'd click
on a stored procedue for example, and the tool would return all areas
where this stored procedure is called, and vice versa.
I'm sure something like this exists, it's just a matter of finding it.
Unfortunately, my google skill are failing me.
But for now, the "select from syscomments" solution will do.
Thanks,
Marc
Ed Murphy wrote:
abc wrote:
SELECT *
FROM syscomments
WHERE TEXT LIKE '%<your function name>%'
Doesn't this miss instances where <your function nameis split
across two chunks of text?
> The problem is that I don't want to change the function, for fear that it is being called by one of the other SP's or triggers in the database (there are hundreds of them) <<
It is considered good practice to have your database objects scripted
and in source code control. If that is the case, then you can use any
text editor to search and manipulate the sps, triggers, udfs, etc...
If that is not the case (I would still recommend scripting), I found
this post with a util stored proc that you may find useful (don't know
if it works or not...) http://groups.google.com/group/comp....83473d28f272d4
HTH ma********@gmail.com wrote:
I am maintaining an application where most of the business rules are in
Triggers, Stored Procedures and User Defined Functions. When a bug
arises, it can get very tedious to debug. Today for example, I wanted
to modify a function that was being called by a trigger. The problem
is that I don't want to change the function, for fear that it is being
called by one of the other SP's or triggers in the database (there are
hundreds of them)
Essentially, I need a tool that allows me to view where functions and
sp's are being referenced from. At the very least, I'd like to perform
a "full text search" in the database objects, so that let's say I have
a function named "fn_doSomething", I can search the schema for this
string and get all the places where it appears.
As you can see, I'm in the dark here. I've never worked on a system
where all business rules are at the database level. If you know of a
tool that does what I describe above, or anything else that would
facilitate my life, please let me know!
Thanks for your help,
Marc
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jen S |
last post by:
I feel like I'm missing something obvious here, but I'm stumped...
I have a stored procedure with code that looks like:
INSERT INTO MyTableA ( ...fields... ) VALUES (...values...)
IF...
|
by: Alex |
last post by:
Hi all,
I am trying to install a java stored procedure via the windows
development centre.
The linux box is running 8.1 FP4 as is the windoze platform. If I am
on the linux box i can install...
|
by: fumanchu |
last post by:
I've got to let end users (really just one person) load billing batch
files into a third party app table. They need to specify the billing
cycle name, the batch name, and the input file name and...
|
by: John |
last post by:
Hi
When developing vb.bet winform apps bound to sql server datasource, is it
preferable to use SELECTs or stored procedure to read and write data from/to
SQL Server? Why?
Thanks
Regards
|
by: wpellett |
last post by:
I can not get the SQL compiler to rewrite my SQL UPDATE statement to
include columns being SET in a Stored Procedure being called from a
BEFORE UPDATE trigger.
Example:
create table...
|
by: Al Willis |
last post by:
Hello,
I've written an insert trigger to fill in data on 5 columns based on the key
field column after a record is added to a table. The trigger works fine.
But what I also want to do is to...
|
by: kaushikroy |
last post by:
i m getting this error when i m executing a stored procedure
Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).
can anyone help me out what exactly the...
|
by: fniles |
last post by:
I am using VB.NET 2003 and SQL2000 database.
I have a stored procedure called "INSERT_INTO_MYTABLE" that accepts 1
parameter (varchar(10)) and returns the identity column value from that
table....
|
by: brwalias |
last post by:
Hi,
using .net 2
sql server 2005
Here is my situation:
I'm passing a variable in the url from a selection on Page A and need
to display the results on the Results page be based on that...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
| | |