Accessing DB2® on an IBM® i System using the Connector for DB2®

You can access DB2® on a IBM® i system using the Connector for DB2®. The procedure varies slightly depending on whether the DB2® database resides on the same system as the Domino® server.

DB2® Database on Same IBM® i System as Domino® Server

Use the following procedure to access a DB2® database that resides on the same system as the Domino® server.

  1. Add a relational database entry in DB2® UDB for iSeries® (IBM® i). An example is shown as follows:
    ADDRDBDIRE RDB(database name) RMTLOCALNAME(*LOCAL)
  2. Create a DB2® Connection document using the relational database name in the preceding statement for the database name entry.
  3. Enter a profile name and password.

    This user profile should have authority to access the given database.

  4. If the table is not journalled, select the "Non-Journalled Data" option in the Connection Properties section of the DB2® Connection document.

DB2® Database on a Different IBM® i System than Domino® Server

Use the following procedure to access a DB2® database that resides on a different system than the Domino® server.

  1. Add a relational database entry in DB2® UDB for iSeries® (IBM® i). An example is shown as follows:
    ADDRDBDIRE RDB(database name) RTMLOCNAME(IPaddress)
  2. Start the DDM server job on the remote IBM® i by using the following command:
    STRTCPSRV *DDM.

    You can verify that the job QRWTLSTN in subsystem QSYSWRK is active by using the WRKACTJOB command.

  3. Create a DB2® connection document using the relational database name in the preceding statement for the database name entry.
  4. Enter a profile name and password.

    This user profile should have authority to access the given database.

  5. If the table is not journalled, select the "Non-Journalled Data" option in the Connection Properties section of the DB2® connection document.
  6. To use interactive SQL to verify that the connection to the remote system is set up correctly, run the STRSQL command from your local system and then issue the following SQL command:
    Connect to remote server name

    You must have 5722-ST1 installed to use STRSQL.

  7. You can also test connectivity using DCTEST from the systemcommand line, where domServer is the name of a Domino® server where HCL Enterprise Integrator (HEI) is installed:
    RUNDOMCMD SERVER(domServer)CMD(CALL PGM(DCTEST)) BATCH(*NO)
    Note: If this is the first time that you have used SQL to connect to a remote system, an error message (SQLPKG not found) may appear. You can run the following agent to create *SQLPKG on the remote system:
    Option Public
    Uselsx "*lsxodbc" 
    Sub Initialize
      Dim con As New ODBCConnection
    	con.AutoCommit=False
    	If (con.ConnectTo("databasename","userid", "pwd")) Then
    		Call con.Disconnect
    	End If
    	Print "Test Create SQL Pkg"     
    End Sub