Run the afcctl utility on any node in the OracleAS Active Failover Cluster to perform the following tasks:
■ Setting the Default Baseline Timestamp
■ Synchronizing Files From a Node to Other Nodes in an OracleAS Active Failover Cluster
■ Listing Modified Files on a Node Since the Last Synchronization ■ Excluding Specific Configuration Files from Synchronization
Note: You can also create a directory to store afcctl.zip outside
of ORACLE_HOME. The instructions in this section assumes you have
Oracle Application Server Active Failover Cluster (UNIX)
Setting the Default Baseline Timestamp
Immediately after installation of OracleAS and afcctl, you should set the default configuration timestamp across the OracleAS Active Failover Cluster. This baseline timestamp marks the default configuration after installation.
After this baseline is set, the next synchronization performed using afcctl with the
sync option synchronizes only those configuration files that have changed since the baseline and the time the afcctl sync command is run.
To create a timestamp baseline, use the following command:
afcctl createbase -p <dbname>|-r <host1>,<host2>,...,<hostN> [-c <cp_exec>] where:
<dbname> is the name of the Infrastructure database
<host1>,<host2>,..,<hostN> is a comma separated list of remote hosts in the OracleAS Active Failover Cluster
<cp_exec> is the full path to a remote copy utility to be used to copy files from the current node to other nodes in the cluster. By default, afcctl uses /usr/bin/rcp, or
/usr/local/bin/scp if the former (rcp) is not found. If neither of these are present
or if you wish scp to precede rcp in the invocation order, use the -c <cp_exec>
option to specify the copy utility to be used.
Synchronizing Files From a Node to Other Nodes in an OracleAS Active Failover Cluster After the initial configuration baseline is set using the createbase option, you can synchronize any configuration changes across the cluster using the sync option. This option synchronizes changed configuration by copying only the modified
configuration files from the current node to all nodes in the OracleAS Active Failover Cluster.
The command syntax for invoking a synchronization is:
afcctl sync -p <dbname>|-r <host1>,<host2>,...,<hostN> -f <filename>|<file_list_dir> [-c <cp_exec>] [-l <hostname>]
where :
<dbname> is the name of the Infrastructure database
<host1>,<host2>,..,<hostN> is a comma separated list of remote hosts in the OracleAS Active Failover Cluster
<filename> is the name of the file to be synchronized
<file_list_dir> is the name of the directory where the .inp files reside
<cp_exec> is the full path to a remote copy utility to be used to copy files from the current node to other nodes in the cluster. By default, afcctl uses /usr/bin/rcp, or
Note: Ensure that ORACLE_HOME is set before running afcctl.
Note: Running afcctl with the createbase option is highly recommended right after installation of OracleAS Active Failover Cluster software.
Oracle Application Server Active Failover Cluster (UNIX)
/usr/local/bin/scp if the former (rcp) is not found. If neither of these are present
or if you wish scp to precede rcp in the invocation order, use the -c <cp_exec>
option to specify the copy utility to be used.
<hostname> is the hostname of the local host at installation time of the Infrastructure Take note of the following when using the above command line:
■ The -p option can only be used if the gsd process has been started and is running. This option also requires that the Infrastructure database and its instances have been registered with the srvm repository, which is the case by default. The -p
option automatically determines the nodes of the OracleAS Active Failover Cluster deployment and propagates the necessary files to the other nodes. ■ The -r option can be used in lieu of -p to explicitly specify the hostnames of the
nodes that need to be synchronized with the node the utility is run on. No other process dependencies exist in this case. Ensure that the hostname(s) specified are valid nodes of the OracleAS Active Failover Cluster deployment.
■ <file_list_dir> for the -f option is the directory where the .inp files of the Oracle Application Server 10g Backup and Recovery Tool exist. The afcctl utility references these files for the list of configuration files that need to be synchronized. ■ <filename> for the -f option is used only when a single file needs to be
synchronized across the cluster.
■ Before using afcctl, set up user equivalence so that the rcp and scp copy utilities can be used without further authentication for the remote hosts. User equivalence is also required for the OracleAS Active Failover Cluster installation. Refer to the high availability chapter in Oracle Application Server 10g Installation Guide for instructions on how to set up user equivalence.
■ -l is optional. It is used to specify the host where afcctl is run and should be specified only in cases where the local hostname during Infrastructure installation is different from the default hostname.
■ It is strongly recommended that the utility is installed on all nodes of the OracleAS Active Failover Cluster deployment. The utility can be invoked from any node of the cluster on which it has been installed. However, as a best practice, designate one node as an administration node and perform all administrative operations and subsequent synchronizations from it.
Listing Modified Files on a Node Since the Last Synchronization
To find out which configuration files on a node in the OracleAS Active Failover Cluster has changed since the last synchronization, use the following command line syntax: afcctl list -f <filename>|<file_list_dir>
where
<filename> is the name of a file that is to be checked for any updates since the last synchronization.
<file_list_dir> is the name of the directory where the .inp files of the Oracle Application Server 10g Backup and Recovery Tool exist. Files in that directory which have been changed since the last synchronization are listed.
A text file containing a list of files that have changed since the last synchronization is created in the /tmp directory. See an example in the section "Example" on page 5-11. The syntax above can be used on any node of the OracleAS Active Failover Cluster deployment. It displays the files that have changed, since the last synchronization, on
Oracle Application Server Active Failover Cluster (UNIX)
the node it is executed on. The returned list of files can be different depending on the site. To synchronize the listed file(s) individually, the -f <filename> option of the afcctl sync command can be used after determing which version of the file is the latest.
Excluding Specific Configuration Files from Synchronization
Oracle recommends that all nodes are configured similarly. If, however, some configuration files need to be different, their names can be added to the exclude file,
afcctl_exclude.inp, so that they are not synchronized across the cluster when
afcctl is run. afcctl_exclude.inp is found in the same directory where you
uncompressed afcctl.zip.
■ Excluding files may be necessary in situations such as when you want to turn debugging on for only a particular node or change a configuration file temporarily to measure impact on the system. Since the files listed in the exclude file are not synchronized, any changes to them have to be propagated manually to the equivalent files on the other nodes until they are removed from the exclude file. If you do not want the exclusions to be permanent, remove the filenames after peforming synchronization.
Example
After any administrative operation to Oracle Application Server 10g (through
Application Server Console or DCM), which can change any of the configuration files, do the following on each node of the OracleAS Active Failover Cluster:
1. Set the ORACLE_HOME environment variable. For example, in a Bourne shell environment, type:
$ export ORACLE_HOME=/home/oracle/test1
2. Invoke afcctl with the list option to display the configuration files that have changed on the current node.
$ afcctl list -f ./br_inp_dir
Oracle Application Server Active Failover Cluster Run Time Control Utility Copyright (c) 2002, 2003 Oracle Corporation. All rights reserved.
Last Sync up time was Mon Sep 8 11:09:11 2003
Check the following for list of files that have changed since last sync work/Files_to_Change_and_Copy.23123
Please look at log/afcctl.log for more information. Exiting....
The file work/Files_to_Change_and_Copy.23123 is created to contain the list of configuration files that have changed since the last synchronization.
3. View the created file to validate that the list of files in it are the ones you want to propagate to the other nodes in the OracleAS Active Failover Cluster. For example:
$ cat work/Files_to_Change_and_Copy.23123
Note: You can also include custom files to be synchronized across the OracleAS Active Failover Cluster nodes each time the afcctl utility is run. The file config.inp contains rules for this task.
Oracle Application Server Active Failover Cluster (UNIX)
/home/oracle/test1/Apache/Apache/conf/ssl.wlt/default/ewallet.p12 /home/oracle/test1/ldap/admin/oidpwdlldap1
/home/oracle/test1/ldap/admin/oidpwdrgit11
4. Invoke afcctl with the sync option to synchronize files from one node in the OracleAS Active Failover Cluster to another.
$ afcctl sync -r hasun26 -f ./backup_scripts
Oracle Application Server Active Failover Cluster Run Time Control Utility Copyright (c) 2002, 2003 Oracle Corporation. All rights reserved.
Files to massage & copy are listed in work/Files_to_Change_and_Copy.22339 Files to copy are listed in work/Files_to_Copy.22339
Do you want to sync up files from hasun25.us.oracle.com to hasun26.us.oracle.com (y/n) ? y
Syncing up files
... ...!
Syncing completed
Do you want to update the dcm repository with configuration files from "hasun25.us.oracle.com" (y/n) ? y
DCM update repository started DCM update repository completed
Please look at log/afcctl.log for more information. Exiting....