Hi Forum,
I'm migrating DTS processes to DataStage jobs, but, in this DTS the customer use code to insert record in a log table, this log table contains all sql operations including the number of records affected, for example, after an insert, delete or update sentence. In sql server, this is possible but in DataStage??
Can i captured this results and use it ???
Thanks,
Number of record affected by SQL operations in the job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 133
- Joined: Wed Mar 05, 2003 4:19 pm
- Location: Lima - Peru. Sudamerica
- Contact:
Number of record affected by SQL operations in the job
Saludos,
Miguel Seclén
Lima - Peru
Miguel Seclén
Lima - Peru
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Not directly. DataStage records the number of rows sent, and the SQL can be captured through stage tracing. Sending this information to a log could also be done, but you would need to design this yourself (just as you would have to script it in DTS). Exactly how would depend on the format of your log - in particular whether it is a text file or a database table. You specified "log table" so possibly the easiest method for you is a DataStage server job that collects and writes the information.
Much of this already exists in downloadable form in the ETLStats package, from
Kim Duke's website
Much of this already exists in downloadable form in the ETLStats package, from
Kim Duke's website
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 132
- Joined: Wed Mar 01, 2006 11:12 pm
- Location: Pune
Re: Number of record affected by SQL operations in the job
Hi Jseclen,jseclen wrote:Hi Forum,
I'm migrating DTS processes to DataStage jobs, but, in this DTS the customer use code to insert record in a log table, this log table contains all sql operations including the number of records affected, for example, after an insert, delete or update sentence. In sql server, this is possible but in DataStage??
Can i captured this results and use it ???
Thanks,
It is not possible the achieve this directly in Datastage. However you can use a hashed file and transformer to get the number of rows for each operation(insert, delete or update ) and then insert rocord in log table for each of them. You will have to do a little bit of programming in datastage for it.
SMB