Test RDB Connection
Before you use Replication over IP, you should run a simple test to check the RDB connection existence (Full SQL access from an RPG program to remote databases from all IBM i high- level languages). This check is a pre-condition for Replication based over IP.
In the following example, there are two computers, a Local computer, and a Target computer whose IP address is 10.20.30.40
- Type the following command on the Local computer:
ADDRDBDIRE RDB(TTT) RMTLOCNAME('10.20.30.40' *IP)
- Type the following command on the Target computer:
CRTDTAQ DTAQ(QGPL/DTAQTTT) MAXLEN(32000)
- Type the following commands on the Local computer:
ADDSVRAUTE USRPRF(*CURRENT) SERVER(TTT) USRID(QSECOFR) PASSWORD(xxxxx)
CRTDTAQ DTAQ(QGPL/DTAQLLL) TYPE(*DDM) RMTDTAQ(QGPL/DTAQTTT) RMTLOCNAME(*RDB) RDB(TTT)
call qsnddtaq (DTAQLLL QGPL x'00010F' 'aaaaaaaaaaaaaaaaaaa')
If this stage fails, the following message will appear (and may also be found in the sent JOBLOG):
CPF9155 Cannot communicate with DDM target system.
CPF9510 Operation on DDM data queue DTAQAAA in QGPL failed.
- When this step succeeds, the contents of DTAQ can be read on the Target computer:
QSH CMD('dataq -r /QSYS.LIB/QGPL.LIB/DTAQTTT.DTAQ')