How to get the SQL sent to DataBase in the Job Log ?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

How to get the SQL sent to DataBase in the Job Log ?

Post by kaps »

Hi

I use ODBC Stage to get the data from DB2. I would like to see the SQL which is sent to the database from DataStage in my job logfile. How do I do that ?

Also, how do we know what SQL has got executed in the database.
I know we can look at view SQL tab to see the SQL which is been sent to database. but how do we know if thats what is getting executed exactly in the database. Otherwords how do we know if the database is not dropping something or converting something in the Database when the query is executed...

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

1. On the Tracing tab select all options except "report row data".

2. Have your DBA monitor what's executed.

DataStage uses "prepared SQL".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Post by kaps »

I did select all options in tracing tab except REPORT ROW DATA and still it does not show me the SQL sent to DataBase in the Job Log.

Am I Missing something here ?

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, my bad. The trace goes into a trace file; a file in the &PH& directory in your project. The file name ends in "Trace".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Post by kaps »

So there is no way we can see the SQL in the job log in Director ?

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The job log logs what the job does. The Link Report entries will normally show the SQL that DataStage sends. As far as I am aware DataStage has no mechanism to capture any "translation" that might be done by an ODBC driver, database client software or database server.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply