Lowfatspread
asked on
is it possible to do a REORG Table or REORGCHK update statistics or a RUNSTATS UPDATE in an SP?
DB2 UDB 7.2 on Unix..
using an SQL store procedure
is it possible to run any of the above sorts of DB2 Command from within a
stored procedure...?
using an SQL store procedure
is it possible to run any of the above sorts of DB2 Command from within a
stored procedure...?
ASKER
thanks ,
but i'm presently forced to only use SQL stored procedures...
(crazy I know)
its looking like i 'll need to do this from a shell script...
i'll leave it open in the hope of further replies...
but i'm presently forced to only use SQL stored procedures...
(crazy I know)
its looking like i 'll need to do this from a shell script...
i'll leave it open in the hope of further replies...
After creating a MyReorgProc from C, it becomes a standard stored procedure that you can call from any languages including Java or SQL.
By the way, did you notice that SQL stored procedures are converted to C to be compiled ? You will find sqc files for your SQL package below SqlLib\Function\....
Hope this helps.
By the way, did you notice that SQL stored procedures are converted to C to be compiled ? You will find sqc files for your SQL package below SqlLib\Function\....
Hope this helps.
ASKER
1) I thought i'd read that an SQL procedure could only call SQL procedures ....
or have i got that mixed up with the access levels , NO SQL , READ SQL , MODIFIES etc...
2 ) oh yes and and i 've tried that argument several times...
or have i got that mixed up with the access levels , NO SQL , READ SQL , MODIFIES etc...
2 ) oh yes and and i 've tried that argument several times...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i 've got
some re-reading for tomorrow then...
thanks
some re-reading for tomorrow then...
thanks
Please look the url below for the "db2Reorg" API
http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/admin/r0009147.htm
and a C example for it
http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/ad/samples/c/s-tbreorg-sqc.htm
and the db2RunStats API
http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/admin/r0008570.htm
==> If you want me to help you to set up a dev environment, I'll be pleased to help you
Hope this helps.