View previous topic :: View next topic
|
Author |
Message |
veselvar
New User
Joined: 11 Aug 2005 Posts: 4
|
|
|
|
Hi,
Can anyone pls tell me how to get the details of the updated rows of the table being used either by the SQL query/the Cobol-Db2 program.
Thanks
Venkatesh |
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
You could find that, if you have any Updated timestamp punched into one of the columns of the tabel and the program is updating that column too when it updates the data.
If you dont have that then it would be difficult i would say. If your program has done some thing which it was not intended to do, then you can RECOVER using the image copies (if one was taken earlier).
I'm not sure whether this can be determined on LOGS.
If some traces were set to ON, then some experts could figure out this i guess. |
|
Back to top |
|
|
veselvar
New User
Joined: 11 Aug 2005 Posts: 4
|
|
|
|
Hi,
Thanks for ur note.
Can we get the details from the Sysibm.syscatalog thru the syscolumns_hist ? |
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
No you cannot. That's a separate concept.
It does not have anything you need at this scenario. |
|
Back to top |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
If you are using a COBOL - DB2 program:
I read from a document that you can see the variable SQLERR(3) for the number of rows updated, inserted or deleted by a DB2 query from SQLCA( SQL communications area).
Anyway I did nt check it out. Give it a shot |
|
Back to top |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
That is valid only for embedded sql statements and SQLERR(3) could give value for only the previously executed embedded sql statement.
Say you have run the program and the program has updated/inserted/deleted few rows. Then i wonder how one could find that with out the controls in place. |
|
Back to top |
|
|
|