Unix Technical Forum

RE: [Info-ingres] is there a tool for stepping through stored procs ?

This is a discussion on RE: [Info-ingres] is there a tool for stepping through stored procs ? within the Ingres forums, part of the Database Server Software category; --> Hi Morgan, One other approach might be to break down a complex DBP into a series of simpler ones ...


Go Back   Unix Technical Forum > Database Server Software > Ingres

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 09:28 PM
Peter Gale
 
Posts: n/a
Default RE: [Info-ingres] is there a tool for stepping through stored procs ?

Hi Morgan,

One other approach might be to break down a complex DBP into a series of
simpler ones that are called from a top level procedure. This would allow
you to see each new procedure call through printrules tracing.

This also has an additional advantage relating to locking. When a DBP is
called, IS or IX locks are taken on ALL tables referenced by the procedure
even if the SQL statements that accessed the table are not executed. This
adds a possibly unnecessary overhead and could potentially cause some
contention problems. If your procedure has a SQL statements embedded in IF
statements you could move those SQL statements to their own DBPS and call
the new DBP's from with the IF statements. Thus

IF condition
INSERT into table_1
ELSE
INSERT into table_2
ENDIF

would become

IF condition
CALLPROC table_1_ins
ELSE
CALLPROC table_2_ins
ENDIF

In terms of locking this approach won't have any benefits in the situation
where the same table is referenced in both parts of the IF. e.g

IF condition
INSERT into table_1
ELSE
UPDATE into table_2
ENDIF

However it would still help with the debugging.

Peter Gale
Comprehensive Solutions (US)
Comprehensive Solutions International (UK)
T: +44 (0)1398 341777 M: +44 (0)7831 513181
PGale@Comp-Soln.co.uk www.Comp-Soln.co.uk-----Original Message-----
From: info-ingres-admin@cariboulake.com
[mailto:info-ingres-admin@cariboulake.com] On Behalf Of morgan brickley
Sent: 27 October 2005 12:31
To: info-ingres@cariboulake.com
Subject: [Info-ingres] is there a tool for stepping through stored procs ?

I find that a lot of time is wasted trying to understand why a database
procedure doesn't behave as expected (i.e. it doesn't return an error it
just doesn't do what I was hoping it would)

Is there any tool to allow stepping through the stored procedure line by
line, a sql-debugger if you will, in order to ascertain the path along
which the procedure winds? and perhaps even see the temporary/permanent
effects the proc has on the DB

Morgan.
_______________________________________________
Info-ingres mailing list
Info-ingres@cariboulake.com
http://mailman.cariboulake.com/mailm...py/info-ingres

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:54 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com