Table of Contents
Database Replication
Cisco Resource Pool Manager Server (Cisco RPMS) supports asynchronous database replication among multiple Cisco RPMS sites that use Oracle 7.3.4 or Oracle 8.0.4 and later. The two recommended database replication scenarios are:
- Master-to-Snapshot or Primary-to-Replicate ReplicationA scenario in which administrative changes are made to the profile database at a single master Cisco RPMS site and those changes are replicated to one or more secondary Cisco RPMS sites at fixed time intervals with snapshots from the master database.
- Master-to-Master or Peer-to-Peer ReplicationA scenario in which administrative changes can be made to the profile databases at two or more peer Cisco RPMS sites, which update one another at fixed time intervals.
Note Cisco strongly recommends that one site is designated as the only site for changing data. If duplicate data is entered, it must be removed from the database for replication to occur successfully.
Note Cisco RPMS supports only asynchronous, not real-time, database replication.
This appendix provides example procedures for setting up Oracle database systems to carry out replication of the Cisco RPMS database among multiple Cisco RPMS sites.
Note If you have multiple existing Cisco RPMS database sites that currently contain disparate data, all of which you wish to preserve when implementing replication, request your database administrator to merge your existing databases at one Master definition site before carrying out the procedures in this appendix.
Figure D-1 illustrates an example of Master-to-Snapshot or Primary-to-Replicate database replication as applied to multiple Cisco RPMS sites. In this scenario, all administrative changes to the database are made through the web-based console to one Cisco RPMS site. Then, at specified time intervals, those changes are replicated to all other sites on the network, enabling the Cisco RPMSes to provide resource management based on a common set of data.
Figure D-1: Master-to-Snapshot Replication
Figure D-2 illustrates Master-to-Master or Peer-to-Peer database replication as applied to multiple Cisco RPMS database sites. In this scenario, local administrative changes to the database can be made through the web-based consoles at two or more Cisco RPMS peer sites. Then, at specified time intervals, each of these peer sites communicate their local changes to all other sites on the network. As with Master-to-Snapshot replication, the end result is that the Cisco RPMSes are able to provide their resource management services based on a common set of data.
Figure D-2: Peer-to-Peer Replication
The following example procedure uses the Oracle Net8 Easy Config (or the Oracle 7 SQL Net Easy Config), Security Manager, Schema Manager, SQL*Plus, and Replication Manager programs run on a Windows 95 workstation console to integrate Oracle database replication with Cisco RPMS.
 | Caution
Implementing Oracle database replication requires an in-depth knowledge of Oracle tools and database structure. Integrating database replication with Cisco RPMS should be carried out by experienced Oracle DBAs only. |
For specific instructions on the Oracle programs, refer to Oracle manuals and on-line help.
Note The following procedures are based on the assumption that multiple Oracle server and tablespace sites have already been installed to service each Cisco RPMS site and that all Cisco RPMS sites have been installed. Refer to the Cisco Resource Pool Manager Server Installation Guide for details.
- The Oracle Master-to-Snapshot replication scenarioConsists of one Master database site and one or more Snapshot database sites. Administrative changes are made to the Master profile database, and those changes are replicated as snapshots at fixed time intervals to the Snapshot sites.
- If you are planning to implement Master-to-Snapshot Replication, decide which of your Oracle database servers will become the Master database site. The remainder of your Oracle servers will become Snapshot sites.
- The Oracle Master-Definition-to-Master-Destination replication scenarioConsists of one Master Definition profile database and one or more Master Destination profile databases. Local administrative profile changes can be made to any of the databases. Local profile database changes at all the sites are periodically sent to and incorporated in the Master Definition profile database, which then updates the destination sites with the compiled changes.
- If you are planning to implement Master-to-Master Replication, decide which of your Oracle Database servers will become the Master Definition site. The remainder of your servers will become Master Destination sites.
- From a console site, ping all target Oracle database sites to verify a connection.
- At each Oracle database site involved in Cisco RPMS database replication, use TNSPING to ensure connectivity with all other sites involved in the replication.
- If you do not have connectivity, locate the tnsnames.ora file in the $ORACLE_HOME/network/admin directory and edit it, making sure that entries exist for all the other Oracle database sites involved in the replication.
- Use the Oracle Net8 Easy Config utility (or the Oracle 7 SQL Net Easy Config utility) to establish a service name entry for each of the Oracle database sites assigned to support a Cisco RPMS. For each database site, specify the following:
- For the service name (or Database Alias in Oracle 7), enter an arbitrary name.
- For the host name (or TCPIP host name in Oracle 7), specify the host name of the Oracle database you want to connect with. If the fully qualified domain name (FQDN) and host name differ, specify the FQDN.
- If the port prompt is displayed, the default value for Oracle is 1521. This must match the port value assigned to the "listener" process on the system to which the console will connect.
- Specify the System Identifier (SID) for this database instance.
Note To support Oracle database replication, the SID for each database must be unique.
- Use the "Test Service" option to verify the connection to the database.
For each service that you created in Step B, use the Oracle Security Administrator to create a special user with special privileges to control database replication.
- Using the Oracle Security Manager, log in as Oracle system manager to each of the database connection services that you created in Step B. For service, enter the name that you entered in the Oracle Net8 Easy Config (or the Oracle 7 SQL Net Easy Config) program.
- For each database connection service, configure a special user, a database replication controller, for each service as follows:
- Create a special user, a database replication control user, to control database replication.
 | Caution
This user must not be the Oracle user that you specified as in charge of the DB account for Cisco RPMS data during Cisco RPMS install. |
- For the user's Default table space, specify the Oracle tablespace that you set up for Cisco RPMS before Cisco RPMS installation.
Note If you using Oracle 7.3.4, assign the database the EXECUTE privilege on the SYS.DBMS_DEFER PL/SQL object to the database replication control user.
- Use the SQL*Plus utility to assign the appropriate privileges to the database replication control user.
- Log in as the Oracle system administrator.
- When prompted for the Host String, enter the service name you created in Step B.
- At the SQL*Plus command prompt, enter:
- execute DBMS_REPCAT_ADMIN.GRANT_ADMIN_ANY_REPGROUP (userid => 'repadmn')
- where repadmn is the name of the database replication control user that you just created.
Create two-way links between the databases. For each database instance, do the following:
- Using the Oracle Schema Manager, log in as the database replication controller user whom you created in Step C to each database connection service that you created in Step B.
- For each database involved in the database replication, configure links with the following settings:
- Create a link (or Database link in Oracle 7) to another database and name it the same as the SID that you specified for the destination database in the Oracle Net8 Easy Config (or Oracle 7 SQL Net Easy Config) in Step B.
- Make all links public.
- Assign as the fixed user (or Named link in Oracle 7), the database replication controller user.
- Specify the service name (or Database Alias in Oracle 7) that you specified for the destination database in the Oracle Net8 Easy Config (or Oracle 7 SQL Net Easy Config) in Step B.
- Test the link by clicking on it, choosing Quick Edit, then clicking Test.
If you are configuring Master-to-Snapshot replication, follow the steps in this section. If you are configuring Master-to-Master replication, skip this section and go to the "F. Configuring a Master-to-Master database replication scenario" section.
Step 1 Edit the initsid.ora configuration file. Do the following at each Oracle site:
- In the Oracle server's $ORACLE_HOME/dbs directory, locate the configuration file: initsid.ora
- where sid is the system identification name of the Oracle server.
- Add the following parameters:
- job_queue_interval = minutes
- job_queue_processes = number
- where:
- minutes is the number of minutes between updates. This value must be equivalent to the update interval time that you set in the refresh group properties menu in the Oracle Replication Manager. (See Step 5, "Using the Oracle Replication Manager, select and set up each database connection that you want to be a Snapshot site as follows:" in this section.)
- number is the number of background processes allotted to the replication operations (must be at least one).
- If you are using Oracle 7.3.4, change the following entry:
compatible = 7.1.0.0
- to:
compatible = 7.3.0.0
- Restart the Oracle server to have the changes to the inisid.ora file take effect.
Step 2 Using the SQL*Plus utility, log in to each database instance that you want to be a Snapshot site.
- Log in specifying the Cisco RPMS username. In the "Host String" prompt enter the service name that you created in the Oracle Net8 Easy Config utility (or the Oracle 7 SQL Net Easy Config utility) in Step B.
- Use the drop table command to delete the following tables from the database assigned to csrpms:
- cs_blob
- cs_blob_data
- cs_call_dscrmnt
- cs_call_type
- cs_customer
- cs_cust_dnis_grp
- cs_cust_rsc_grp
- cs_cust_vpdn_grp
- cs_dnis
- cs_dnis_grp
- cs_group_profile
- cs_password
- cs_privilege
- cs_profile
- cs_profile_blob
- cs_rpt_attr
- cs_rpt_type
- cs_rpt_type_detail
- cs_rsc_grp
- cs_svc_grp
- cs_user_profile
- cs_vpdn_grp
- cs_vpdn_grp_dnis
- cs_vpdn_grp_ip
Step 3 Using the Oracle Replication Manager, create a database connection for each database connection service that you set up in Step B.
- For administrator, specify the user who you set up as the replication database controller in Step C.
- For database (or TCP/IP Host Name in Oracle 7), specify the service name (or Database Alias in Oracle 7) you entered for this database in Step B.
Step 4 Using the Oracle Replication Manager, select the database connection that you want to be the Master Definition site and create and configure the master group on this site as follows:
- For the master group assign an arbitrary name.
- If you need to specify a propagator, specify the user you set up as the replication database controller in Step C.
- Use the Objects tab to add the schema that you set up for Cisco RPMS and assign the following tables to the master group:
- cs_blob
- cs_blob_data
- cs_call_dscrmnt
- cs_call_type
- cs_customer
- cs_cust_dnis_grp
- cs_cust_rsc_grp
- cs_cust_vpdn_grp
- cs_dnis
- cs_dnis_grp
- cs_group_profile
- cs_password
- cs_privilege
- cs_profile
- cs_profile_blob
- cs_rpt_attr
- cs_rpt_type
- cs_rpt_type_detail
- cs_rsc_grp
- cs_svc_grp
- cs_user_profile
- cs_vpdn_grp
- cs_vpdn_grp_dnis
- cs_vpdn_grp_ip
- When the Support for Group box appears, make sure that the Generate and Resume Replication Activity options are enabled.
- Create snapshot logs for each of the tables that you assigned to the master group in this step.
Step 5 Using the Oracle Replication Manager, select and set up each database connection that you want to be a Snapshot site as follows:
- Specify public links.
- Select the link to the Master Definition site.
- Select the master group that you set up in Step 3.
- Select the tables to replicate:
- cs_blob
- cs_blob_data
- cs_call_dscrmnt
- cs_call_type
- cs_customer
- cs_cust_dnis_grp
- cs_cust_rsc_grp
- cs_cust_vpdn_grp
- cs_dnis
- cs_dnis_grp
- cs_group_profile
- cs_password
- cs_privilege
- cs_profile
- cs_profile_blob
- cs_rpt_attr
- cs_rpt_type
- cs_rpt_type_detail
- cs_rsc_grp
- cs_svc_grp
- cs_user_profile
- cs_vpdn_grp
- cs_vpdn_grp_dnis
- cs_vpdn_grp_ip
- Disabling the update optionCauses the Snapshot site to be read-only. Configuring read-only Snapshot sites ensures that Cisco RPMS administration can only be carried out at the Master site.
- Configure the refresh group properties.
- From the refresh group properties menu, schedule the interval (for example, every 24 hours) when the update should occur.
- To carry out initial replication and to verify your replication process so far, use the refresh now, or refresh immediately option to create the objects to be replicated from the Master Definition site.
Step 6 At the Master Definition database site, change to $BASEDIR/sbin of the Cisco RPMS directory and enter the following:
csdbtool cache_trigger
Note The csdbtool cache_trigger command line enables replication changes to the profile database of a Cisco RPMS to be incorporated in the profile cache of that Cisco RPMS also. When the replication process updates a record in the profile database, the cache triggers write the updated records to the cs_trans_log table, which is read by the Cisco RPMS dbserver module, which, in turn, incorporates the changed records in the Cisco RPMS profile cache.
Step 7 At each Snapshot database site, change to the Cisco RPMS $BASEDIR/sbin directory and run the following Cisco RPMS command line:
csdbtool cache_trigger_snap
Step 8 Before you create any new configurations, configure the Snapshot sites to prevent duplicate entries. At each Snapshot site, enter the following command:
csdbtool ora_rep_indx_snap
If you are configuring Master-to-Master replication, follow the steps in this section. If you are configuring Master-to-Snapshot replication, ignore this section.
Step 1 Edit the initsid.ora configuration file. Do the following at each Oracle site:
- In the Oracle server's <$ORACLE_HOME>/dbs directory, locate the configuration file: initsid.ora
- where sid is the system identification name of the Oracle server.
- Add the following parameters:
- open_cursor = 150
- job_queue_interval = minutes
- job_queue_processes = number
- where:
- minutes is the number of minutes between updates. This value must be equivalent to the intervals required when you created the scheduled links in Step 8 and Step 9 of Step F.
- number is the number of background processes allotted to the replication operations (must be at least one).
- If you are using Oracle 7.3.4, change the following entry:
compatible = 7.1.0.0
- to:
compatible = 7.3.0.0
Step 2 Restart the Oracle server to have the changes to the inisid.ora file take effect.
Step 3 Using the SQL*Plus utility, log in to each database instance that you want to be a Master Destination site:
- Log in specifying the Cisco RPMS username. In the "Host String" prompt enter the service name that you created in the Oracle Net8 Easy Config utility (or the Oracle 7 SQL Net Easy Config utility) in Step B.
- Use the drop table command to delete the following tables from the Cisco RPMS database:
- cs_blob
- cs_blob_data
- cs_call_dscrmnt
- cs_call_type
- cs_customer
- cs_cust_dnis_grp
- cs_cust_rsc_grp
- cs_cust_vpdn_grp
- cs_dnis
- cs_dnis_grp
- cs_group_profile
- cs_password
- cs_privilege
- cs_profile
- cs_profile_blob
- cs_rpt_attr
- cs_rpt_type
- cs_rpt_type_detail
- cs_rsc_grp
- cs_svc_grp
- cs_user_profile
- cs_vpdn_grp
- cs_vpdn_grp_dnis
- cs_vpdn_grp_ip
 | Caution
Remember, delete the above tables from Master Destination sites only. |
Step 4 For each database connection service, create a surrogate replication administrator:
- Using the Oracle Security Manager, log in as Oracle system manager to each of the database connection services that you created in Step B. For service, enter the name that you entered in the Oracle Net8 Easy Config (or the Oracle 7 SQL Net Easy Config) program.
- For each database connection service, configure a special user, a surrogate replication administrator, for each service as follows:
- (a) Create a special user, a surrogate replication administrator, to control database replication.
 | Caution
This user must not be the Oracle user that you specified as in charge of the DB account for Cisco RPMS data during Cisco RPMS install. |
- (b) For the user's Default table space, specify the Oracle tablespace that you set up for Cisco RPMS before Cisco RPMS installation.
Step 5 Using the SQL*Plus utility, assign the appropriate privileges to the database surrogate replication administrator at each Oracle site:
- Log in as the Oracle system manager. When prompted for the Host String, enter the service name you created in Step B.
- At the SQL*Plus command prompt, enter:
- execute DBMS_REPCAT_AUTH.GRANT_SURROGATE_REPCAT(userid => 'surrogate_repadmn')
- where surrogate_repadmn is the name of the surrogate replication administrator that you just created.
Step 6 Using the Oracle Replication Manager, create a database connection for each database connection service that you set up in Step B.
- For administrator, specify the user who you set up as the replication database controller in Step C.
- For database, specify the service name (or Database Alias in Oracle 7) you entered for this database in Step B.
Step 7 Using the Oracle Replication Manager, select the database connection that you want to be the Master Definition site and create and configure the master group on this site as follows:
- For the master group assign an arbitrary name.
- If you need to specify a propagator, specify the user you set up as the replication database controller in Step C.
- Use the Objects tab to add the schema that you set up for Cisco RPMS and assign the following tables to the master group:
- cs_blob
- cs_blob_data
- cs_call_dscrmnt
- cs_call_type
- cs_customer
- cs_cust_dnis_grp
- cs_cust_rsc_grp
- cs_cust_vpdn_grp
- cs_dnis
- cs_dnis_grp
- cs_group_profile
- cs_password
- cs_privilege
- cs_profile
- cs_profile_blob
- cs_rpt_attr
- cs_rpt_type
- cs_rpt_type_detail
- cs_rsc_grp
- cs_svc_grp
- cs_user_profile
- cs_vpdn_grp
- cs_vpdn_grp_dnis
- cs_vpdn_grp_ip
- Use the Destinations tab to add the public database links for the master destination sites to the master group.
Step 8 Using the Oracle Replication Manager, select and set up the database connection that you want to be a Master Definition site as follows:
- For each Master Destination site, create a new scheduled link.
- For Database Link, specify the database connection from which the Master Definition site will receive replicated data.
- When finished configuring, click Enable.
Step 9 Using the Oracle Replication Manager, select and set up each database connection that you want to be a Master Destination site as follows:
- Create a new scheduled link.
- For Database Link, specify the database connection from which the Master Destination site will receive replicated data.
- When finished configuring, click Enable.
Step 10 Using the Oracle Replication Manager, carry out the initial replication of the master group in each connection that you set up. For each master group configuration, go to Admin Requests and select the option, Apply all Administrative requests now.
Step 11 At each database site, run the following command line:
csdbtool cache_trigger
Step 12 In order to prevent two different Cisco RPMSes from assigning the same internal profile ID number to different entries, assign non-overlapping ranges of internal profile ID numbers to each Master Destination site as follows:
Note Profile ID numbers are unique numbers internally assigned to Cisco RPMS objects for internal tracking. Each object has its own sequence. For example, cs_cust_dnis_grp, cs_cust_res_grp, and cs_cust_vpdn_grp each has its own sequence. The absolute range of permissible profile ID numbers is between 1 and 2,147,483,647.
- At the first master site, start SQL*Plus and use the update command to set a maximum range for internal profile ID numbers. For example:
- update cs_id set id = 10000000 -1 where type = 'max_profile'
- At the second master site, start SQL*Plus and use the update command to set a non-overlapping minimum and maximum range for internal Profile ID numbers. For example:
- update cs_id_v set id = 10000000
- update cs_id set id = 10000000 where type = 'min_profile'
- update cs_id set id = 20000000 -1 where type = 'max_profile'
- Repeat the process for all the master sites, incrementing the values each time to avoid overlapping Profile ID numbers. For example:
- update cs_id_v set id = 20000000
- update cs_id set id = 20000000 where type = 'min_profile'
- update cs_id set id = 30000000 -1 where type = 'max_profile'
Note At each site, when setting minimum and maximum profile ID range, be sure to set a range sufficient to accommodate anticipated growth in the required profile ID numbers.
Step 13 After initial replication has occurred, and before you create any new users, configure the Master Destination sites to prevent duplicate entry names. At each Master Destination site, enter the following command:
csdbtool ora_rep_indx
In cases where Oracle Master-to-Master (or Master-to-Updateable-Snapshot) database replication has been implemented, the Cisco RPMS system administrators must avoid updating the same Cisco RPMS object at two or more different Cisco RPMS database sites during the same interval between database replication processes.
If updating of the same object at two different sites within the same interval between replications occurs, the object edits at neither site will be replicated or reconciled. The object will remain with unreconciled settings at both sites, and the following Oracle error message will appear at both sites within the "Local Errors" section of the Oracle Replication Manager tree:
ORA-01403 no data found error
The above error should rarely occur because, in practice, no more than one administrator should be authorized to administer Cisco RPMSes. However, if this error does occur, you must fix the unreconciled object at both sites:
Step 1 Use the web-based Cisco RPMS Administration web pages or the Java-based Cisco RPMS Administrator program to do the following:
(a) Examine the object settings at each site. Determine which object you want replicated and note the settings.
(b) Delete the object at both sites.
(c) At one of the sites, create a new object with the same name as the profile you just deleted.
(d) Manually configure this oject with the settings that you want.
Step 2 Use the Oracle Replication Manager to force replication, or wait until the next scheduled replication. Settings for the new object will replicate throughout the system.







Posted: Thu Aug 31 07:35:37 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.