Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2006
    Posts
    21

    Question Unanswered: Unknown error returned when using admin_cmd() to export data

    Hi,

    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 v8.1.1.89 with FixPak "9" on AIX. "/path" is valid and the user calling this store proc has proper privilege to write file to /path.

    Thank you for your help!
    Last edited by miyuki; 06-20-06 at 22:36.

  2. #2
    Join Date
    Nov 2003
    Location
    Netherlands
    Posts
    96
    Quote Originally Posted by miyuki
    I am using v8.1.1.89 with FixPak "9" on AIX. "/path" is valid and the user calling this store proc has proper privilege to write file to /path.

    Thank you for your help!
    Does the instance owner also have the proper privileges to write to the /path directory?

  3. #3
    Join Date
    Jun 2006
    Posts
    21
    Thank you for your response.
    Sorry, I am not really getting what you mean.

    DB2 was created by root. Is it what u mean by instance owner??

  4. #4
    Join Date
    Nov 2003
    Location
    Netherlands
    Posts
    96
    If you instance name is db2inst1 then user db2inst1 automatically is the instance owner.

  5. #5
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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.

    Andy

  6. #6
    Join Date
    Jun 2006
    Posts
    21
    I have the instance owner named "tu1" and an user "appuser1" to run the stored proc. appuser1 also has write access to "/path"

    GertK,

    Do you suggest that "tu1" also needs the write access to /path in order to export data to /path?

    ARWinner,
    I am not sure what is db2 fenced user. In my case, do you mean "appuser1" is the db2 fenced user and so admin_cmd stored proc should be able to run under "appuser1"?

    Correct me if I am wrong.

  7. #7
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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.

    Andy

  8. #8
    Join Date
    Nov 2003
    Location
    Netherlands
    Posts
    96
    The OP can check under which user the db2fmp process is running, this process runs the fenced procedures. If I do remember well the command 'ps -ef|grep db2fmp' should give the needed info on AIX.

  9. #9
    Join Date
    Jun 2006
    Posts
    21
    Thank a lot for all of you! I really find out that appuser1 is not one of the fenced users. I will discuss with my teammates to see how to deal with this issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •