Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2002
    Location
    Hamilton
    Posts
    150

    Unanswered: calling user exit to test it

    Can someone help me with the parameters that are required to execute the following command?

    I will be trying it both on AIX and on Linux

    Basically I don't kknow what is necessary for the reference to the OS?or what they are looking for in terms of the db release?

    thanks for your help

    Mark


    db2uext2 -OS<os> -RL<release> -RQ<request> -DB<dbname> -NN<nodenumber> -LP<logpath> -LN<logname>
    /* where: os = operating system */
    /* release = DB2 release */
    /* request = 'ARCHIVE' or 'RETRIEVE' */
    /* dbname = database name */
    /* nodenumber = node number */
    /* logpath = log file path */
    /* logname = log file name */
    /* logsize = log file size (optional) */
    /* startingpage = starting offset in 4K page unit */
    /* (optional) */
    /* adsmpasswd = ADSM password (optional)


    Mark

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: calling user exit to test it

    -OS AIX
    -RL SQL07025
    -RQ ARCHIVE
    -DB SAM1
    -NN NODE0000
    -LP /home/db2inst2/db2inst2/NODE0000/SQL00002/SQLOGDIR/
    -LN S0000000.LOG
    are the parms for a database SAM1 in instance db2inst2 on my AIX EE node.

    BTW, I copied the following script to my sqllib/adm directory and issued a

    db2 archive log command for database sam1

    This is a dirty script, which has a minor syntax error . But it solves the purpose of getting the required information.

    while true
    do
    echo $1 >> /tmp/db2uext2.out
    shift 1
    if ("$1"="") then
    exit
    fi
    done

    for RL, use the DB2 Code Release in the db2level command's output.

    HTH

    Cheers

    Sathyaram



    Originally posted by mark_maz
    Can someone help me with the parameters that are required to execute the following command?

    I will be trying it both on AIX and on Linux

    Basically I don't kknow what is necessary for the reference to the OS?or what they are looking for in terms of the db release?

    thanks for your help

    Mark


    db2uext2 -OS<os> -RL<release> -RQ<request> -DB<dbname> -NN<nodenumber> -LP<logpath> -LN<logname>
    /* where: os = operating system */
    /* release = DB2 release */
    /* request = 'ARCHIVE' or 'RETRIEVE' */
    /* dbname = database name */
    /* nodenumber = node number */
    /* logpath = log file path */
    /* logname = log file name */
    /* logsize = log file size (optional) */
    /* startingpage = starting offset in 4K page unit */
    /* (optional) */
    /* adsmpasswd = ADSM password (optional)


    Mark
    Last edited by sathyaram_s; 09-26-02 at 21:07.

  3. #3
    Join Date
    Feb 2002
    Location
    Hamilton
    Posts
    150
    thank you so much for your help

    this is the command I ran

    db2uext2 -OS AIX -RL SQL07020 -RQ ARCHIVE -DB was -NN NODE0000 -LP /home/wasinst/wasinst/NODE0000/SQL00001/SQLOGDIR -LN S0000000.LOG

    I get the following error in the directory that i am trying to archive the file in

    Time of Error: Thu Sep 26 23:27:16 2002

    Parameter Count: 15
    Parameters Passed:
    Audit Log File:
    System Call Parms:
    Media Type: disk
    User Exit RC: 20

    > Error isolation: Action is not valid

    The Rc 20 means invalid parameters, could I have typed something in incorrectly? All the information is accurate, when I went to try it again, I actually got a ARCHIVE.LOG file with the following
    Time Started: Thu Sep 26 23:29:37 2002

    Parameter Count: 8
    Parameters Passed:
    Database name: WAS
    Logfile name: S0000001.LOG
    Logfile path: /home/wasinst/wasinst/NODE0000/SQL00001/SQLOGDIR
    Node number: NODE0000
    Operating system: AIX
    Release: SQL07020
    Request: ARCHIVE
    System Action: ARCHIVE from /home/wasinst/wasinst/NODE0000/SQL00001/SQLOGDIR file S0000001.LOG t
    o /tmp/WAS
    Media Type: disk
    User Exit RC: 0 File does not exist, assume it is already archived.
    Time Completed: Thu Sep 26 23:29:37 2002


    Notice the time difference on the two files

    Hope you can help me some more, thanks

    mark

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I have a feeling that the second output is DB2 generated (based on the number of parameters)

    Try

    db2uext2 -OSAIX -RLSQL07020 -RQARCHIVE -DBwas -NNNODE0000 -LP/home/wasinst/wasinst/NODE0000/SQL00001/SQLOGDIR
    -LNS0000000.LOG

    which brings the parmcount to 8.

    The calling format in db2uext2.cdisk

    db2uext2 -OS<os> -RL<release> -RQ<request> -DB<dbname> */
    /* -NN<nodenumber> -LP<logpath> -LN<logname> */
    /* [-AP<adsmpasswd>]

    doesn't show space between -OS and <os> , does it ?

    Though we understand all these, even for testing, I recommend using the IBM supported db2 archive command rather than calling db2uext2 directly from the command line.

    HTH

    Cheers

    Sathyaram




    Originally posted by mark_maz
    thank you so much for your help

    this is the command I ran

    db2uext2 -OS AIX -RL SQL07020 -RQ ARCHIVE -DB was -NN NODE0000 -LP /home/wasinst/wasinst/NODE0000/SQL00001/SQLOGDIR -LN S0000000.LOG

    I get the following error in the directory that i am trying to archive the file in

    Time of Error: Thu Sep 26 23:27:16 2002

    Parameter Count: 15
    Parameters Passed:
    Audit Log File:
    System Call Parms:
    Media Type: disk
    User Exit RC: 20

    > Error isolation: Action is not valid

    The Rc 20 means invalid parameters, could I have typed something in incorrectly? All the information is accurate, when I went to try it again, I actually got a ARCHIVE.LOG file with the following
    Time Started: Thu Sep 26 23:29:37 2002

    Parameter Count: 8
    Parameters Passed:
    Database name: WAS
    Logfile name: S0000001.LOG
    Logfile path: /home/wasinst/wasinst/NODE0000/SQL00001/SQLOGDIR
    Node number: NODE0000
    Operating system: AIX
    Release: SQL07020
    Request: ARCHIVE
    System Action: ARCHIVE from /home/wasinst/wasinst/NODE0000/SQL00001/SQLOGDIR file S0000001.LOG t
    o /tmp/WAS
    Media Type: disk
    User Exit RC: 0 File does not exist, assume it is already archived.
    Time Completed: Thu Sep 26 23:29:37 2002


    Notice the time difference on the two files

    Hope you can help me some more, thanks

    mark

  5. #5
    Join Date
    Feb 2002
    Location
    Hamilton
    Posts
    150
    Do the following directories have to exist in your archive path already?

    Note the to specify a target directory for copied logs in the program,_it implicitly suffixes with "<Database Name>/NODE0000"._ Thus we need to precreate this directory in order for this to work.

    Because I believe DB2 appends that to the archive path that you chose in your userexit setting?

    I have set my userexit archive path to be /db_arch, does that mean that should have included the database name and the node directory in the path as well or should I precreate them in the previously mentioned archive path?

    thanks

    Mark

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Extract from db2uext2.cdisk :

    ARCHIVE_PATH: Path where log files will be archived to ==*/
    /*== Notes: 1. the path is concatenated with the database ==*/
    /*== name ( the database name will be UPPERCASE ) ==*/
    /*== and the node number ( the node number will ==*/
    /*== be in UPPERCASE ) to form the physical ==*/
    /*== archive path ==*/
    /*== 2. the physical archive path must exist ( the ==*/
    /*== user exit will not create the path ) ==*/
    /*== 3. the path must end with a back slash ==*/
    /*== 4. the default path is "/u/" ==*/


    HTH

    Cheers

    Sathyaram

    Originally posted by mark_maz
    Do the following directories have to exist in your archive path already?

    Note the to specify a target directory for copied logs in the program,_it implicitly suffixes with "<Database Name>/NODE0000"._ Thus we need to precreate this directory in order for this to work.

    Because I believe DB2 appends that to the archive path that you chose in your userexit setting?

    I have set my userexit archive path to be /db_arch, does that mean that should have included the database name and the node directory in the path as well or should I precreate them in the previously mentioned archive path?

    thanks

    Mark

Posting Permissions

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