Db2

  • 1.  Identify which connection string submitted a shell script job

    Posted Mon February 01, 2021 10:18 AM
    In Data Server Manager, whenever a shell script job was submitted, the executing script on the database server had a variable available $DSWEB_DATABASE_PROFILENAME that contained the name of the connection string that activated the job.

    In Data Management Console what mechanism is available in the shell script to identify the connection string of the submitted job

    ------------------------------
    Andrew Finlaison
    ------------------------------

    #Db2


  • 2.  RE: Identify which connection string submitted a shell script job

    Posted Tue February 02, 2021 09:13 PM
    Edited by System Fri January 20, 2023 04:15 PM
    Hi Andrew,
    Would you please upload a screenshot where it showing the variable $DSWEB_DATABASE_PROFILENAME?
    What is the type of your job exactly, an "Executable/Shell Script" or a "DB2 CLP Script"?
    And it will connect to a database by the DB2 CLP command in the script, is that right?  If that is allowed, could you please share your shell script content, all or the part of connecting to the database?

    Thank you.


    ------------------------------
    Tao Wen
    ------------------------------



  • 3.  RE: Identify which connection string submitted a shell script job

    Posted Thu February 04, 2021 02:12 AM

    Hi Tao,

     

    Attached is a korn shell script that runs correctly out of Job Manager in Data Server Manager.

     

    The variables available to the  above script at execution time are documented at the following link

     

    https://r.search.yahoo.com/_ylt=Awr9J.lInRtgBokAUTIL5gt.;_ylu=Y29sbwNncTEEcG9zAzIEdnRpZAMEc2VjA3Ny/RV=2/RE=1612451272/RO=10/RU=https%3a%2f%2fwww.ibm.com%2fsupport%2fknowledgecenter%2fSS62YD_4.1.1%2fcom.ibm.datatools.db.web.jobmanager.doc%2ftopics%2fscript_variables.html/RK=2/RS=LHeMkkR81Avf.dgznEjFHCYov1Q-

    Regards,

     

    Andrew Finlaison

     

    Email       andrew.finlaison@bigpond.com

     

    Home     +61 2 4841  1372

    Mobile    +61 413 041 722

     






  • 4.  RE: Identify which connection string submitted a shell script job

    Posted Fri February 05, 2021 04:53 AM
    Hi Andrew,
    I don't see the attachment of a korn shell script, Do you forget to upload it?

    Regards,

     



    ------------------------------
    Tao Wen
    ------------------------------