I've created a stored procedure in db2, and I've modified it a couple of times, but in my db manager (Dbbeaver) and RazorSQL the same stored procedure appears two times. How can I determine what the last version is?
Asked
Active
Viewed 227 times
0
-
The information schema tables probably have creation/modification timestamps. Generally, you're only supposed to be able to have one of a procedure, though (ie, if you used `ALTER`, as `CREATE` should fail for a duplicate object). If you're _testing_ multiple versions, you generally don't care about creation order, just which is `A` and which is `B` (...if this is the case, usually you name them `Old` and `New` or something similar). What do you want this information for? – Clockwork-Muse Nov 28 '14 at 03:24
1 Answers
0
On zOS DB2 the following will show the alter timestamp:
SELECT
name,
alteredts
FROM
SYSIBM.SYSROUTINES
WHERE
NAME = 'myproc'
AND SCHEMA = 'myschema'
You'll need to have read rights to the SYSIBM tables. Also, if two SPs have the same name, it might be because they have overloaded parameters.

Stavr00
- 3,219
- 1
- 16
- 28