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 > Executing db2exfmt using ADMIN_CMD

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-29-09, 01:34
usDB2 usDB2 is offline
Registered User
 
Join Date: May 2008
Posts: 39
Executing db2exfmt using ADMIN_CMD

Hi

I am trying to use db2exfmt inside procedure.Procedure got created successfully.But I am getting below error when I execute it.

ADMINCMD statement in Procedure:

CALL SYSPROC.ADMIN_CMD('db2exfmt -d X-e Y-s Y-w -1 -n'||PKGNAME||'-g -# 0 -o '||OBJECT_NAME||'.exp');

execution statement:
call "Y"."ADM_EXP"('Y','Y.SAMP')
SQL0171N The data type, length or value of argument "1" of routine
"SYSPROC.ADMIN_CMD" is incorrect. SQLSTATE=42815

Please help

thanks
Reply With Quote
  #2 (permalink)  
Old 01-29-09, 01:49
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
According to the V9R5 Infocenter (If you are not on V9.5 the list of supported commands may be smaller):

The ADMIN_CMD procedure supports the following DB2 command line processor (CLP) commands:

ADD CONTACT
ADD CONTACTGROUP
AUTOCONFIGURE
BACKUP - online only
DESCRIBE
DROP CONTACT
DROP CONTACTGROUP
EXPORT
FORCE APPLICATION
IMPORT
INITIALIZE TAPE
LOAD
PRUNE HISTORY/LOGFILE
QUIESCE DATABASE
QUIESCE TABLESPACES FOR TABLE
REDISTRIBUTE
REORG INDEXES/TABLE
RESET ALERT CONFIGURATION
RESET DATABASE CONFIGURATION
RESET DATABASE MANAGER CONFIGURATION
REWIND TAPE
RUNSTATS
SET TAPE POSITION
UNQUIESCE DATABASE
UPDATE ALERT CONFIGURATION
UPDATE CONTACT
UPDATE CONTACTGROUP
UPDATE DATABASE CONFIGURATION
UPDATE DATABASE MANAGER CONFIGURATION
UPDATE HEALTH NOTIFICATION CONTACT LIST
UPDATE HISTORY

Note: Some commands might have slightly different supported syntax when executed through the ADMIN_CMD procedure.

The procedure also supports the following commands which are not supported by the CLP:

GET STMM TUNING DBPARTITIONNUM
UPDATE STMM TUNING DBPARTITIONNUM
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 01-29-09, 01:52
usDB2 usDB2 is offline
Registered User
 
Join Date: May 2008
Posts: 39
Thanks for your reply.Is there any other to call db2exfmt through procedure
Reply With Quote
  #4 (permalink)  
Old 01-29-09, 01:58
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You would have to write a SP in C language that can issue commands to the operating system command line. I believe that Knut posted some information about this, so try searching the forum. Personally, I think you are barking up the wrong tree.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
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