Oracle® Internet Directory Administrator's Guide 10g (9.0.4) Part Number B12118-01 |
|
Oracle Directory Replication Administration, 2 of 5
This section tells you how to install and configure multimaster replication groups, and how to resolve conflicts manually in them. It contains these topics:
This section discusses the general tasks you perform when installing and configuring a multimaster replication group. It contains these topics:
Preliminary Information for Installing and Configuring a Multimaster Replication Group
Task 1: Install Oracle Internet Directory on the Master Definition Site
Task 2: Install the Oracle Internet Directory on the Remote Master Sites
Task 3: Set Up Oracle9i Advanced Replication for a Directory Replication Group
Task 4: Load Data into the Directory
Task 5: Start Oracle Directory Server Instances on All the Nodes
Task 6: Start the Replication Servers on All Nodes in the DRG
Task 7: Test Directory Replication
Note:
|
This section describes the types of installation you need to perform to configure a multimaster replication group. It also introduces the Replication Environment Management Tool that enables you to perform various configuration tasks.
In Oracle Internet Directory 10g (9.0.4), performing multimaster replication requires Oracle9i Advanced Replication, which is part of a typical installation of the Oracle9i Enterprise Edition. A typical installation of Oracle9i Standard Edition does not include Oracle9i Advanced Replication.
When you install Oracle Internet Directory as part of Oracle Application Server on any node, you are prompted to select a product. Choose the Oracle Application Server Infrastructure. Then, later in the installation process, you are prompted to choose one of various installation types. The installation type that you must choose depends on whether you are installing on a node that serves as a master definition site (MDS) or one that serves as a remote master site (RMS).
If you are installing on a Master Definition Site
If you are installing on a Remote Master Site
Later, the Oracle Universal Installer asks for the host and port of Oracle Internet Directory. Specify the host and port number of the MDS. Verify that the server is running on that node.
After installation, create the wallet by entering the following:
$Oracle_Home/bin/Oidpasswd connect=connect_string create_wallet=TRUE
current_password=password_for_the_ODS_database_user
Start and shut down the Oracle Internet Directory processes by entering the following:
$Oracle_Home/bin/oidmon connect=connect_string start $Oracle_Home/bin/oidctl connect=connect_string server=oidldapd instance=1 start $Oracle_Home/bin/oidmon connect=connect_string stop
During installation and configuration, you use the Replication Environment Management Tool to perform various tasks. This tool assists you in:
"The Replication Environment Management Tool" for more information about the Replication Environment Management Tool
See Also:
You must be able to use Oracle Net Services to connect to the master definition site database and all other nodes in the DRG.
See Also:
|
See Also:
"Oracle Application Server Infrastructure" for instructions on installing on a remote master site |
The following sections lead you through installing and configuring Oracle9i Advanced Replication through Oracle Internet Directory installation scripts. More advanced Oracle9i Advanced Replication users may prefer to configure Oracle9i Advanced Replication through the Oracle9i Advanced Replication Manager Tool.
To configure the Oracle9i Advanced Replication environment to establish a directory replication group (DRG), perform the tasks discussed in these topics:
To prepare the Oracle Net Services environment, follow these steps, described more fully in this section, on all nodes in the directory replication group:
To prepare the Oracle Net Services environment for replication:
sqlnet.ora
.
The sqlnet.ora
file should contain the following parameters at minimum:
names.directory_path = (TNSNAMES) names.default_domain = domain
On UNIX, this file is in ORACLE_HOME/network/admin
On Windows NT, this file is in ORACLE_HOME\network\admin
tnsnames.ora
.
Define all Oracle Internet Directory database instances in the DRG on all nodes in the DRG. The tnsnames.ora
file must contain connect descriptor information in the following format for all Oracle Internet Directory databases:
connect_string = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = HOST_NAME_OR_IP_ADDRESS) (PORT = 1521)) (CONNECT_DATA = (service_name = service_name)))
On UNIX, this file is in $
ORACLE_HOME/network/admin
On Windows NT, this file is in ORACLE_HOME\network\admin
You may want to create multiple rollback segments. You can increase the size of the table spaces and segments to meet your system requirements.
Execute SQL*Plus by typing the following command:
sqlplus system/system_password@net_service_name
At the SQL*Plus prompt, type:
CREATE TABLESPACE table_space_name datafile file_name_with_full_path SIZE 50M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE max_bulk_update transaction_size ex:500M;
At the SQL*Plus prompt, type the following lines for each rollback segment:
CREATE ROLLBACK SEGMENT rollback_segment_name tablespace table_space_name storage (INITIAL 1M NEXT 1M OPTIMAL 2M MAXEXTENTS UNLIMITED);
Repeat the CREATE ROLLBACK SEGMENT
command for each rollback segment entered in the initialization parameter file.
Type the following lines in the initialization parameter file:
rollback_segments = (rollback_segment_name_1, rollback_segment_name_2 ...) SHARED_POOL_SIZE = 20000000
Ensure that the total System Global Area (SGA) does not exceed 50% of your system's physical memory.
To stop the listener for the Oracle Internet Directory database, use the listener control utility (lsnrctl). Type the following command at the LSNRCTL command prompt:
SET PASSWORD password STOP [listener_name]
SET PASSWORD
is required only if the password is set in the listener.ora
file. The password defaults to ORACLE
. The default listener name is LISTENER
.
To restart the listener for the Oracle Internet Directory database, type the following command at the LSNRCTL command prompt:
START [listener_name]
To stop and restart the Oracle Internet Directory database, you can use SQL*Plus.
Use SQL*Plus. Test both internal@
net_service_name
and internal@
net_service_name.domain
. If this does not work, then replication will not work.
To do this:
oidpwdl
and is located in the directory ORACLE_HOME
/ldap/admin
.
oidpwdr
, and is located in the directory ORACLE_HOME
/ldap/admin
.
ORACLE_HOME/ldap/bin/remtool -asrsetup
The Replication Environment Management Tool (remtool) configures Oracle9i Advanced Replication.
Note:
If you encounter errors, then clean up the environment by using the |
See Also:
|
If you have a small number of entries to add to the DRG, you can wait until you have completely configured the DRG, then use ldapadd to load the data to one of the nodes. The entries will then be replicated to the other nodes at the specified time.
If you have a large amount of data to load into the DRG, then use the bulkload utility. To do this:
bulkload.sh -connect connect_string -check -generate file_with_absolute_ path_name
bulkload.sh -connect connect_string_1 -load
connect_string_1
with the connect string of another node in the DRG, until you have loaded the data onto all the nodes. For example, enter:
bulkload.sh -connect connect_string_2 -load
then enter:
bulkload.sh -connect connect_string_3 -load
and so on, until you have bulkloaded the data onto each node in the DRG.
Note: To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:
|
See Also:
|
To start Oracle directory server instances on all nodes, run the following commands on each node:
oidmon [connect=
connect_string] [sleep=
seconds] start
oidctl connect=connect_string server=oidldapd instance=instance_number_of_ directory_server flags='-h host_name -p port' start
Be sure that the change logging option for the directory server is set to the default, namely, TRUE.
See Also:
Chapter 3, "Preliminary Tasks and Information" for more information on starting an Oracle directory server instance. |
To start replication servers on all nodes, type the following command on each node:
oidctl connect=connect_string server=oidrepld instance=1
flags='-h host_on_which_the_directory_server_is_running -p port' start
Note that the instance number does not need to be unique across the entire DRG.
See Also:
Chapter 5, "Oracle Directory Server Administration" for information on starting the replication servers |
You can turn off the multimaster flag, which occurs in the directory replication server, by changing the value of the -m
flag in the OID Control Utility command for Oracle directory replication server from the default, namely, TRUE
, to FALSE
. This is useful for reducing performance overhead if you are deploying a single master with read-only replica consumers. The multimaster option controls conflict resolution, which serves no purpose if you are deploying a single master.
Note:
As part of Task 3, the Replication Environment Management Tool ( |
Use Oracle Directory Manager to verify that the directory replication servers are running, then test directory replication by doing the following:
orcladmin
.
The identical entry appears in approximately 1 to 10 minutes on the RMS. You can adjust the timing in the replication server configuration set entry. If entries are modified on any nodes in the DRG, then the changes will be replicated.
Note: If you want to configure replication for Oracle Application Server Single Sign-On, then follow the post-installation steps specific to Oracle Application Server Single Sign-On. These are found in the replication installation section of the Oracle Application Server Single Sign-On Administrator's Guide. |
Note: A new node that you add to an existing multimaster replication group must have Oracle Application Server Infrastructure product installed on it. During that installation, the installation type must have been "Oracle Application Server Metadata Repository". For more information, see "Task 2: Install the Oracle Internet Directory on the Remote Master Sites". |
There are two ways to add a new node to a live replication group.
If your directory contains less than one million entries, then use this method.
This method involves using the ldifwrite utility to back up LDAP data with operational attributes preserved. Once this is done, the bulkload utility is then used to load data to all replicas in a group.
Use bulkload with the -check
, -generate
, and -restore
arguments once, and then with the -load
argument once for each replica. When using the -load
argument on each replica, preserve the operational attributes by using the same intermediate files generated by using the -generate
argument.
Backup using this method can take up to seven hours for a directory with one million entries.
For a directory of more than a million entries, this method takes much less time than the previously mentioned method.
Before you add a replication node, prepare the Oracle Net Services environment as described in "On All Nodes, Prepare the Oracle Net Services Environment for Replication".
To add a replication node to a functioning DRG of any significant size, follow these general steps, each of which is more fully described later in this chapter.
Task 1: Stop the Directory Replication Server on All Nodes
Task 2: Identify a Sponsor Node and Switch the Sponsor Node to Read-Only Mode
Task 3: Backup the Sponsor Node by Using ldifwrite
Task 4: Perform Oracle9i Advanced Replication Add Node Setup
Task 5: Switch the Sponsor Node to Updatable Mode
Task 6: Start the Directory Replication Server on All Nodes Except the New Node
Task 7: Load Data into the New Node by Using bulkload
Task 8: Start the Directory Server on the New Node
Task 9: Start the Directory Replication Server on the New Node
Note: Commands shown in the following tasks require the following types of items to be stored as follows: Before beginning "Task 1: Install Oracle Internet Directory on the Master Definition Site", be sure that all three of these types of items are in the path. |
To stop the directory replication server, run the following command on each node in the LDAP replication group:
oidctl connect=db_connect_string server=oidrepld instance=1 stop
A sponsor node is one that will supply the data to the new node. To identify a sponsor node and switch it to read-only mode:
change_mode.ldif
, containing the following:
dn: changetype: modify replace: orclservermode orclservermode: r
ldapmodify -D "cn=orcladmin" -w welcome -h host_name_of_sponsor_node
-p port -f change_mode.ldif
This switches all running Oracle directory servers to read-only mode.
Because this may take a long time, you may start "Task 4: Perform Oracle9i Advanced Replication Add Node Setup" while backup is in process.
Enter the following command:
ldifwrite -c connect string -b "orclAgreementID=000001,cn=replication configuration" -f output_ldif_file
You can perform this task at the same time as you are performing "Task 3: Backup the Sponsor Node by Using ldifwrite".
On the sponsor node, enter this command:
ORACLE_HOME/ldap/bin/remtool -addnode
The Replication Environment Management Tool adds the node to the DRG.
See Also:
"-ADDNODE Option" of the Replication Environment Management Tool for instructions on using the -ADDNODE option and an example |
To switch the sponsor node to updatable mode:
change_mode.ldif
to the following:
dn: changetype: modify replace: orclservermode orclservermode: rw
ldapmodify -D "cn=orcladmin" -w welcome -h host_name_of_sponsor_node
-p port -f change_mode.ldif
This switches all running Oracle directory servers to read/write mode.
To start the directory replication server, type the following command:
oidctl connect=db_connection_string server=oidrepld instance=1
flags='-h host -p port' start
Verify that no directory or replication processes are running on the new node.
To load data, type the following command:
bulkload.sh -connect db_connect_string_of_new_node -check -generate -load
-restore absolute_path_to_the_ldif_file_generated_by_ldifwrite
Note: To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:
|
To start the directory server, type the following command:
oidctl connect=db_connect_string_of_new_node server=oidldapd
instance=1 flags='-p port' start
Note: If you need to change configuration or agreement parameters, see Managing Replication. |
To start the directory replication server, type the following command:
oidctl connect=db_connect_string_of_new_node server=oidrepld instance=1
flags='-h host_name_of_new_node -p port' start
Note: Once a directory server instance is participating in a replication agreement, do not use the bulkload tool to add data into the node. Instead, use ldapadd. If Oracle Application Server Single Sign-On is desired in replication, then follow the Oracle Application Server Single Sign-On Administrator's Guide in the replication installation section for the post-installation steps specific to Oracle Application Server Single Sign-On. |
At times, you may want to delete a node from a DRG--for example, if the addition of a new node did not fully succeed as a result of system errors.
You can delete a replication node from a DRG only if there are more than two nodes in the DRG.
To delete a replication node, perform these tasks, each of which is more fully described in this section.
Task 1: Stop the Directory Replication Server on All Nodes
Task 2: Stop All Processes in the Node to be Deleted
Task 3: Delete the Node from the Master Definition Site
To stop the directory replication server, run the following command on each node in the DRG:
oidctl connect=connect_string server=oidrepld instance=1 stop
On the node to be deleted, stop the OID Monitor and all directory server instances.
oidmon [connect=
connect_string][host=virtual/host_name]
stop
oidctl connect=connect_string server=oidldapd instance=server_instance_number stop
See Also:
|
From the MDS, run the following script:
remtool -delnode
The Replication Environment Management Tool deletes the node from the replication group.
See Also:
"-DELNODE Option" of the Replication Environment Management Tool for instructions on using the -DELNODE option and an example |
This process can take a long time, depending on your system resources and the size of your DRG. The script keeps you informed of its progress.
To start the directory replication server, type the following command:
oidctl connect=connect_string server=oidrepld instance=1
flags='-h host -p port' start
This section contains these topics:
If a conflict has been written into the log, then it means that the system is not able to resolve it by following its resolution procedure. To avoid further replication change conflicts arising from earlier unapplied changes, it is important to monitor the logs regularly.
To monitor replication change conflicts, examine the contents of the replication log. You can distinguish between messages by their respective timestamps.
Conflict resolution messages, examples of which are shown in this section, are logged in the file oidrepld00.log
. The path for this file is ORACLE_HOME/ldap/log
. The result of each attempt to resolve the replication conflict is displayed at the end of each conflict resolution message.
2000/08/03::10:59:05: ************ Conflict Resolution Message ************ 2000/08/03::10:59:05: Conflict reason: Attempted to modify a non-existent entry. 2000/08/03::10:59:05: Change number:1306. 2000/08/03::10:59:05: Supplier:eastlab-sun. 2000/08/03::10:59:05: Change type:Modify. 2000/08/03::10:59:05: Target DN:cn=ccc,ou=Recruiting,ou=HR,ou=Americas,o=IMC,c=US. 2000/08/03::10:59:05: Result: Change moved to low priority queue after failing on 10th retry.
2000/08/03::10:59:05: ************ Conflict Resolution Message ************ 2000/08/03::10:59:05: Conflict reason: Attempted to add an existing entry. 2000/08/03::10:59:05: Change number:1209. 2000/08/03::10:59:05: Supplier:eastlab-sun. 2000/08/03::10:59:05: Change type:Add. 2000/08/03::10:59:05: Target DN:cn=Lou Smith, ou=Recruiting, ou=HR, ou=Americas, o=IMC, c=US. 2000/08/03::10:59:05: Result: Deleted duplicated target entry which was created later than the change entry. Apply the change entry again.
2000/08/03::10:59:06: ************ Conflict Resolution Message ************ 2000/08/03::10:59:06: Conflict reason: Attempted to delete a non-existent entry. 2000/08/03::10:59:06: Change number:1365. 2000/08/03::10:59:06: Supplier:eastlab-sun. 2000/08/03::10:59:06: Change type:Delete. 2000/08/03::10:59:06: Target DN:cn=Lou Smith,ou=recruiting,ou=hr,ou=americas,o=imc,c=us. 2000/08/03::10:59:06: Result: Change moved to low priority queue after failing on 10th retry.
The Human Intervention Queue Manipulation Tool enables you to move changes from the human intervention queue to either the retry queue or the purge queue. Moving the change to the purge queue means that there are no further attempts to re-apply the changelog entry. To address changes in the human intervention queue, follow these general steps:
"The Human Intervention Queue Manipulation Tool" for instructions on how to use the Human Intervention Queue Manipulation Tool
See Also:
When the directory replication server encounters inconsistent data, you can use the OID Reconciliation Tool to synchronize the entries on the consumer with those on the supplier. When you do this, perform the following general steps:
See Also:
|
![]() Copyright © 1999, 2003 Oracle Corporation. All Rights Reserved. |
|