Unanswered: Unknown error returned when using admin_cmd() to export data
I would like to know if anyone uses SYSPROC.ADMIN_CMD() to export data and encounter error before? I got the following error when i called it.
SQL0969N There is no message text corresponding to SQL error "-2079391743" in the message file on this workstation. The error was returned from module "SQLEFTKN" with original tokens "<database_name>".
here is what i have called.
CALL SYSPROC.ADMIN_CMD('export to /path/table1.del OF DEL select * from table1')
I am using v18.104.22.168 with FixPak "9" on AIX. "/path" is valid and the user calling this store proc has proper privilege to write file to /path.
Actually it is the db2 fenced user that needs to have write rights to the directory. The admin_cmd stored procedure runs as a fenced process and as such is ran under the fenced user. This user is normally db2fenc1.
I cannot tell you what your Fenced User is. It is defined at the time an instance is created. (This usually happens when DB2 is installed). I have not yet figured out a way to ask the server/instance who is the fenced user. You will need to ask the person who created the instance.