Hi everyone, Im new a this forum and I hope you can help me.
Im trying to run the export command from a DB2 sp but Im receiving an error, here is my code:
SET cadenaExport = 'export to /export/home/concar/text.csv of del modified by coldel, NOCHARDEL select * from tc_campo;
This is the error:
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0440N No authorized routine named "SYSPROC.ADMIN_CMD" of type "PROCEDURE having compatible arguments was found. LINE NUMBER=22. SQLSTATE=42884
I hope you can help me. thanks a lot for your help
what version of DB2 are you on? As far as I know, admin_cmd is only available since 8.2.2 (fixpack 9).
Thanks, this is my DB2 info:
DB21085I Instance "db2crm" uses "32" bits and DB2 code release "SQL08020" with
level identifier "03010106".
Informational tokens are "DB2 v22.214.171.124", "s040914", "U498351", and FixPak "7".
Product is installed at "/opt/IBM/db2/V8.FP7".
does the ADMIN_CMD works? if its not, what can I do to call the export utility from a stored procedure?