Results 1 to 4 of 4
  1. #1
    Join Date
    May 2008
    Posts
    39

    Unanswered: 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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    Join Date
    May 2008
    Posts
    39
    Thanks for your reply.Is there any other to call db2exfmt through procedure

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

Posting Permissions

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