Setting Up the Database Links for Standard Replication

Standard replication is a retrieving operation; that is, the database location requesting the data must initiate the action. In addition, standard replication uses a network connection to copy information from one location to another location. As a result, you need to create links between the locations in your installation. (Note that disconnected replication is done by export and load, and does not rely on database links or a network connection.)

For more information , see:

Configuring the DB_LINKS Codelist for Standard Replication

Each database location in the installation maintains the DB_LINKS local reference codelist, which has an entry in the Short Value field for each of the other database locations in the installation. The Long Value contains the name of the private database link to that database, owned by the RXC_REP or RXA_DES user.

To configure the DB_LINKS codelist for standard replication:

  1. Navigate to Admin, Reference Codelists, and then select Local Codelists.

  2. Query for the DB_LINKS local codelist.

    1. In the Short Value field, enter a name for each of the other locations (instances) in the installation. This name should be descriptive, such as "CRO-LONDON" or "HEADQUARTERS" or "PHILA-SITE."

    2. In the Long Value field, enter the database link name of the private link to that database.

Note the name of the private link you specify in the DB_LINKS codelist. You will need this information when you create the private database links for the RXC_REP and RXA_DES accounts later in this section.

Configuring the PUBLIC_DB_LINKS Codelist for Standard Replication

Each database in the installation also maintains the PUBLIC_DB_LINKS local reference codelist, which also has an entry in the Short Value field for each of the other database locations in the installation. The Long Value contains the name of the public database link to that database.

To configure the PUBLIC_DB_LINKS codelist for standard replication:

  1. Navigate to Admin, Reference Codelists, and then select Local Codelists.

  2. Query for the PUBLIC_DB_LINKS local reference codelist:

    1. In the Short Value field, enter the name for each of the other locations in the installation.

    2. In the Long Value field, enter the database link name of the public link to that database.

Note the name of the public link you specify in the PUBLIC_DB_LINKS codelist. You will need this information when you create the public database link for the RXA_READ account later in this section.

Creating the Private Database Links for the RXC_REP and RXA_DES Accounts

After you set up the DB_LINKS and the PUBLIC_DB_LINKS local reference codelists, you need to create the database links to the other locations in your installation

Note:

You use the password for the RXC_REP and RXA_DES accounts when creating database links at other locations. If you modify the password, you must recreate the database links at those other locations.

To create the private database links required for standard replication:

  1. Set environment variables for the database name and code environment; see Setting Environment Variables on the Command Line

  2. Create the private database link for the RXC_REP account:

    1. Connect to SQL*Plus as RXC_REP.

    2. Create a private database link to each of the other database locations:

      create database link linkname connect to rxc_rep identified by password using 'connectstring' ;

      where:

      • linkname is the name specified for your private database link in the DB_LINKS reference codelist.

      • password is the password of the RXC_REP account.

      • connectstring is the appropriate SQL*Net connect string.

        Make sure the connectstring has single quotes around it. Oracle recommends that the connectstring be the same as the linkname although it is possible for them to be different.

    3. Verify that you created the link correctly. The following command should return RXC_REP as the user:

      SELECT username FROM user_users@linkname ;

  3. Create the private database link for the RXA_DES account:

    1. Connect to SQL*Plus as RXA_DES.

    2. Create a private database link between the RXA_DES accounts in each instance:

      create database link linkname connect to rxa_des identified by password using 'connectstring' ;

      where:

      • linkname is the name specified for your private database link in the DB_LINKS reference codelist (and also matches the linkname value used for the same database in the previous step).

      • password is the password of the RXA_DES account.

      • connectstring is the SQL*Net alias of the database to which the link connects.

        Make sure the connectstring has single quotes around it.

    3. Verify that you created the link correctly. The following command should return RXA_DES as the user:

      SELECT username FROM user_users@linkname ;

  4. Exit from SQL*Plus.

Creating the Public Database Link for RXA_READ

To set up the public database link for standard replication:

  1. Connect to SQL*Plus as SYS.

  2. Create a public database link to each of the other database locations for the RXA_READ account:

    create public database link linkname connect to rxa_read identified by password using 'connectstring' ;

    where:

    • linkname is the name specified for your database link in the PUBLIC_DB_LINKS reference codelist.

    • password is the password of the RXA_READ account.

    • connectstring is the SQL*Net alias of the database to which the link connects.

      Make sure the connectstring has single quotes around it. Oracle recommends that the connectstring be the same as the linkname, although it is possible for them to be different, if Global Naming is not enabled for the database.

  3. Verify that you created the link correctly. The following command should return RXA_READ as the user:

    SELECT username FROM user_users@linkname ;

  4. Exit from SQL*Plus.