Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toad and Oracle

Status
Not open for further replies.

tekkerguy

Programmer
Nov 16, 2005
196
US
is there a way to see what tables are being loaded by an sp in toad without going through the code itself?
 
tek,

Within reason, No.

TOAD isn't magic, it's just another (very powerful) GUI tool for working with Oracle. If you want to see what code is doing, then you have to debug it. TOAD's debugger is easily the best of the bunch, so you've got the right tool for the job.

I acknowledge the technical possibility of scanning every table in the database and dumping all the records to a file. The sp could be run, and the entire database scanned once more and another file produced. Differencing the two files would definitively show what was added by the sp, but this isn't a realistic approach. Hence my response was "within reason".

If you are only altering a few tables, the before and after scenario is excellent, and is called unit testing. If you're trying to do that, then look up a tool called QUTE from Quest software (the makers of TOAD).

Regards

Tharg

Grinding away at things Oracular
 
You could try something like the following to get a rough idea:
Code:
SELECT line, text 
  FROM dba_source
 WHERE UPPER(text) LIKE '%INSERT%'
    OR UPPER(text) LIKE '%UPDATE%'
    OR UPPER(text) LIKE '%DELETE%';
Of course, this will only work if the table name is on the same line as the DML command. But if it isn't, then you can query up the subsequent line number in a follow-on query. As Tharg suggests, this is not TOAD magic - it's just SQL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top