Page tree
Skip to end of metadata
Go to start of metadata

SAP NOTE 663756 DB6 Multiconnect to DB2 for zOS- DB2 for i or IDS databases-CLI
SAP NOTE 160484 - DB2/390: Database multiconnect with EXEC SQL
setup DBCO connection from NetWeaver 7.5 with Db2 LUW 10.5 to remote server DB2 9.1 on z/OS (mainframe)
1)  use 3270 emulation to find . . .
    1.1)  SSID
    1.2)  LOCATION
    
    1A)  start Open Text . . . host explorer . . . hostex32
                
    1B)  choose 3270 emulation
                


 

     

             notice SSID: DB2F upper right corner             -DISPLAY DDF DETAIL      notice LOCATION: 
        

        2. Binding CLI bind files for the target database
              This step is only necessary for DB2 z/OS target databases.
        2a.  Log on to DB2 LUW command line session in putty as user <sapsid>adm
        2b.  Go to the directory where the bind files reside.
                If you use DB2 LUW as the primary database, the bind files typically reside on the database server
                   in the following directory:  ~db2<dbsid>/sqllib/bnd
        2c.  Set the environment variable DB2_CLI_DRIVER_INSTALL_PATH to the CLI driver base directory as follows:
                setenv DB2_CLI_DRIVER_INSTALL_PATH /usr/sap/<SAPSID>/SYS/global/db6/<your OS>/db6_clidriver/?
                   tcsh:root@benz:/> echo $DB2_CLI_DRIVER_INSTALL_PATH
                   DB2_CLI_DRIVER_INSTALL_PATH: Undefined variable.
                   tcsh:root@benz:/> setenv DB2_CLI_DRIVER_INSTALL_PATH /usr/sap/X5D/SYS/global/db6/LINUXX86_64/db6_clidriver
                   tcsh:root@benz:/> echo $DB2_CLI_DRIVER_INSTALL_PATH
                   /usr/sap/X5D/SYS/global/db6/LINUXX86_64/db6_clidriver
                   tcsh:root@benz:/>

        2d.  Bind additional packages as follows:
                DB2 for z/OS: db2cli bind @ddcsmvs.lst -database <DB name>:<DB host>:<DB port> -user <user> -passwd <password>
                   Here is how it looks using an SAP in-house sandbox system with hostnm=benz and <SID>=X5D
                   ********************************************************************************
                   /bin/su <sid>adm
                   alias pro
                   pro
                   cat /etc/services | grep -i sapdb2
                   cd /db2/db2<sid>/sqllib/bnd
                   db2cli bind @ddcsmvs.lst -database <SID>:<hostnm>.<fqdn>:<db2luw_port> -user db2<sid> -passwd <db6_pwd>
                   ********************************************************************************
                           ********************************************************************************
                           tcsh:root@<hostnm>:/> /bin/su <sid>adm
                           <hostnm>:<sid>adm 51> alias pro
                           setenv SHELL tcsh;setenv mwshell tcsh;set prompt="`echo $mwshell`:`id |cut -f2 -d'(' |cut -f1 -d')'`@`hostname | cut -f1 -d'.'`:`pwd`> ";alias idmw "id |cut -f2 -d'(' |cut -f1 -d')'";alias cd 'chdir \!* && set prompt="`echo $mwshell`:`idmw`@`hostname | cut -f1 -d'.'`:`pwd`> "';
                           <hostnm>:<sid>adm 52> pro
                           tcsh:<sid>adm@benz:/> cat /etc/services | grep -i sapdb2
                           sapdb2<SID>       <db2luw_port>/tcp       # SAP DB2 Communication Port
                           tcsh:<sid>adm@<hostnm>:/> cd /db2/db2<sid>/sqllib/bnd
                           tcsh:<sid>adm@<hostnm>:/db2/db2<sid>/sqllib/bnd> db2cli bind @ddcsmvs.lst -database <SID>:<hostnm>.<fqdn>:<db2luw_port> -user db2<sid> -passwd <db6_pwd>

                           LINE    MESSAGES FOR ddcsmvs.lst
                           ------  ----------------------------------------------         ----------------------
                                   SQL0061W  The binder is in progress.
                                   SQL0091N  Binding was ended with "0" errors and "0" warnings.

                           tcsh:<sid>adm@<hostnm>:/db2/db2<sid>/sqllib/bnd> 
                           ********************************************************************************

        3. Configuration in DBCON table
              /oDBCO
                 Display -> Change (Ctrl+F1)
                    New Entries
                       DB Connection   <made_up_name__like__DB2XXXX>
                       DBMS            DB2
                       User Name       <db2zos_uid>
                       DB password     <db2zos_pwd>        /        <db2zos_pwd>
                       Conn. info      SSID=DB2F;PS=NULL;SAPDBHOST=<db2zoshostnm>.<fqdn>;LOCATION=<location>;PORT=<db2zos_port>;SCHEMA=<SCHEMA_usually__DB2ZOS_UID>


  
                 
               
        4.  /oSE38
                 ADBC_TEST_CONNECTION
                    Execute (F8)
                       DB Connection Name   DB2MALC
                          Execute (F8)
                             18.04.2019           Testing a Database Connection Defined in DBCON
                             -------------------------------------------------------------------
                             Connection DB2XXXX       successfully opened.
                             Connection DB2XXXX       closed


        5.  Create logical system for DBCO connection DB2 MALC
               /oBD54
         

        6.  /oRSA1
                      under DB Connect
                      right click and “create”
                      enter /select logical system created in step 3. Above
                      enter DB type . . . DB2 . . .
                      select connection entry . . . . DB2MALC ( basically assign/mapping logical system DB2MALC with DB Connection DB2MALC)




        7.  RSDL_META_UPLOAD

               /oSE38
                      execute RSDL_META_UPLOAD
                      select logical system
                      use gui to display tables and table data in that remote server / db connection



author:  MALCOLM B WEAVER JR


  • No labels