If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Unknown error returned when using admin_cmd() to export data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-20-06, 21:23
miyuki miyuki is offline
Registered User
 
Join Date: Jun 2006
Posts: 21
Question 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 21:36.
Reply With Quote
  #2 (permalink)  
Old 06-21-06, 06:20
GertK GertK is offline
Registered User
 
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?
Reply With Quote
  #3 (permalink)  
Old 06-21-06, 07:25
miyuki miyuki is offline
Registered User
 
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??
Reply With Quote
  #4 (permalink)  
Old 06-21-06, 08:02
GertK GertK is offline
Registered User
 
Join Date: Nov 2003
Location: Netherlands
Posts: 96
If you instance name is db2inst1 then user db2inst1 automatically is the instance owner.
Reply With Quote
  #5 (permalink)  
Old 06-21-06, 08:17
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
  #6 (permalink)  
Old 06-21-06, 08:54
miyuki miyuki is offline
Registered User
 
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.
Reply With Quote
  #7 (permalink)  
Old 06-21-06, 09:26
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
  #8 (permalink)  
Old 06-21-06, 11:04
GertK GertK is offline
Registered User
 
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.
Reply With Quote
  #9 (permalink)  
Old 06-21-06, 21:35
miyuki miyuki is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On