ariq Rahiman over 9 years ago
To execute DB2 UDB Admin Functions to work in Aqua Data Studio, you can use the SYSPROC.ADMIN_CMD procedure which will work through most of the JDBC drivers.
1. Open a query window in Aqua Data Studio to your DB2 Server
2. Use the ADMIN_CMD procedure CALL SYSPROC.ADMIN_CMD()
3. Some sample IBM DB2 UDB Admin commands which run in Aqua Data Studio Query Analyzer are given below:
To describe a table use the command:
CALL SYSPROC.ADMIN_CMD(‘describe table DCMS.acct_activity’)
To execute DB2 RUNSTATS on a table use the command:
CALL SYSPROC.ADMIN_CMD(‘RUNSTATS ON table DCMS.acct_activity’)
To run a DB2 Export command use:
CALL SYSPROC.ADMIN_CMD(‘Export To c:\acct.del OF DEL SELECT * FROM DCMS.”acct_activity” ‘)
Note: For EXPORT command to work you need specify a directory path of the Server. Export will also work with a file url to a shared drive on another device.