Tuesday, October 30, 2007

AS 10g Change name / IP address

Changing the Host Name and IP Address (Middle Tier)
The procedure to change either the host name only, the IP address only, or both includes the following steps:

Step 1: Prepare Your Host
In this step, you prepare your host for the change by removing instances from clusters and stopping all processes.
1. If the host contains a middle-tier instance that is part of a Managed OracleAS Cluster Using Database Repository, Managed OracleAS Cluster Using File-Based Repository, or Manually Managed OracleAS Cluster, remove the instance from the cluster. You can add the instance back into the cluster at the end of the procedure. Use either Application Server Control or the dcmctl leavecluster command-line utility.
2. If the host contains a middle-tier instance that is part of an OracleAS Web Cache cluster, remove the instance from the cache cluster. You can add the instance back into the cluster at the end of the procedure. Use either Application Server Control or the dcmctl leavecluster command.
3. Shut down each middle-tier instance on the host by running the following commands in each Oracle home:
$ORACLE_HOME/bin/emctl stop iasconsole
$ORACLE_HOME/opmn/bin/opmnctl stopall
4. Verify that all Oracle Application Server processes have stopped.
5. Make sure Oracle Application Server processes will not start automatically after a reboot by disabling any automated startup scripts you may have set up.

Step 2: Change the Host Name and IP Address on Your Operating System
In this step, you update your operating system with the new host name, IP address, or both, reboot, and verify that the host is functioning properly on your network. Consult your operating system documentation, system administrator, and network administrator for more information about how to do this.
1. Make the updates to your operating system to properly change the host name, IP address, or both.
2. Reboot the host.
3. Verify that you can communicate with the host from another host in your network. Be sure to communicate using the new host name to make sure that everything is resolving properly.

Step 3: Update the Middle-Tier Instances on Your Host
In this step, you update the Oracle Application Server middle-tier instances on your host with the new host name and IP address. Follow these steps for each middle-tier instance on your host. Be sure to complete the steps entirely for one middle-tier instance before you move on to the next.
1. Log in to the host as the user that installed the middle-tier instance.
2. Make sure your ORACLE_HOME environment variable is set to the middle-tier Oracle home.
3. Run the following commands in the middle-tier Oracle home:
cd $ORACLE_HOME/chgip/scripts ./chgiphost.sh –mid
The chgiphost.sh command prompts for information that you must provide. The number of prompts depends on your middle-tier installation type. Note that the prompts may provide values in parentheses. These are not default values—they are just reminders. You must enter a value for each prompt. For information about changing the host name and IP Address of a middle tier, refer to the Oracle Application Server 10g Administrator’s Guide.
4. Verify that the tool ran successfully by checking for errors in the files in the following directory: $ORACLE_HOME/chgip/log.

Step 4: Restart Oracle Application Server
In this step, you restart the middle-tier instances and restore your configuration back to the way it was before you started the procedure.
1. Start each middle-tier instance on your host by running the following commands in each Oracle home:
$ORACLE_HOME/opmn/bin/opmnctl startall $ORACLE_HOME/bin/emctl start iasconsole
2. If you removed any instances from an OracleAS Cluster at the beginning of this procedure, then add them back to the cluster. Use either Application Server Control or the dcmctl joincluster command. For instructions on adding instances to a cluster, refer to the Oracle Application Server 10g High Availability Guide.
3. If you removed any instances from an OracleAS Web Cache cluster at the beginning of this procedure, then add them back to the cache cluster. For instructions on adding caches to a cluster, refer to the Oracle Application Server Web Cache Administrator’s Guide.
4. If you disabled any processes for automatically starting Oracle Application Server at the beginning of this procedure, then enable them.

Step 5: Update OracleAS Portal and OracleAS Wireless
This is a special step required for updating OracleAS Portal and OracleAS Wireless. You must perform this step if:
You changed the host name
Your middle-tier instance is running OracleAS Portal and OracleAS Wireless
When you change the host name, the OracleAS Wireless server URL changes to use the new host name. You must update OracleAS Portal with the new OracleAS Wireless service URL. OracleAS Wireless is used by OracleAS Portal as an intermediary in providing access to mobile devices. To provide this access, OracleAS Portal must know the URL to the OracleAS Wireless service on which the Portal is registered. If the OracleAS Wireless service URL has changed, its reference within OracleAS Portal must be updated. This reference can be updated in either of the following ways:
Specify the OracleAS Wireless Portal Service URL using the Global Settings page.
Use the cfgiasw script to update the OracleAS Wireless Service URL reference.
To obtain detailed instructions on updating the OracleAS Wireless Portal service URL reference, refer to the Oracle Application Server Portal Configuration Guide 10g.


Changing the IP Address (OracleAS Infrastructure)
The procedure to change the IP address for the host that runs OracleAS Infrastructure includes four steps as outlined in the slide.

****** In Infrastructure you can change only IP Address, never change the hostname


Step 1: Prepare Your Host
In this step, you prepare your host for the change by stopping all processes.
1. Shut down all middle-tier instances that use the OracleAS Infrastructure, even if they are on other hosts.
2. Shut down the OracleAS Infrastructure:
prompt> $ORACLE_HOME/bin/emctl stop iasconsole prompt> $ORACLE_HOME/opmn/bin/opmnctl stopall prompt> $ORACLE_HOME/bin/lsnrctl stop prompt> $ORACLE_HOME/bin/sqlplus /nolog SQL> connect SYS as SYSDBA SQL> shutdown SQL> quit
3. Verify that all Oracle Application Server processes have stopped.
4. Make sure that Oracle Application Server processes do not start automatically after a reboot by disabling any automated startup scripts you may have set up.

Step 2: Change the IP Address on Your Operating System
In this step, you update your operating system with the new IP address, reboot, and verify that the host is functioning properly on your network. Consult your operating system documentation, system administrator, and network administrator for more information about how to do this.
1. Make the updates to your operating system to properly change the IP address.
2. Reboot the host.
3. Verify that you can ping the host from another host in your network. Be sure to ping using the new host name to make sure that everything is resolving properly.

Step 3: Update OracleAS Infrastructure
In this step, you update OracleAS Infrastructure on your host with the new IP address.
1. Log in to the host as the user that installed OracleAS Infrastructure.
2. Make sure your ORACLE_HOME and ORACLE_SID environment variables are set to OracleAS Infrastructure Oracle home and the OracleAS Infrastructure database.
3. Start the database using:
prompt> $ORACLE_HOME/bin/sqlplus /nolog
SQL> connect / as SYSDBA
SQL> startup
SQL> quit
4. Run the following commands in the OracleAS Infrastructure Oracle home:
prompt> $ORACLE_HOME/opmn/bin/opmnctl start
prompt> $ORACLE_HOME/opmn/bin/opmnctl startproc ias-component=OID process-type=OID
prompt> cd $ORACLE_HOME/chgip/scripts prompt> ./chgiphost.sh –infra
The chgiphost.sh command prompts for the old and new IP addresses.
5. Verify that the tool ran successfully by checking for errors in the files in the following directory: $ORACLE_HOME/bin/chgip/log.

Step 4: Restart OracleAS Infrastructure
In this step, you restart OracleAS Infrastructure and any middle-tier instances that use it.
1. Start OracleAS Infrastructure:
prompt> $ORACLE_HOME/bin/sqlplus /nolog SQL> connect SYS as SYSDBA SQL> startup SQL> quit prompt> $ORACLE_HOME/lsnrctl start prompt> $ORACLE_HOME/opmn/bin/opmnctl startall prompt> $ORACLE_HOME/bin/emctl start iasconsole
2. Start all middle-tier instances that use OracleAS Infrastructure, even if they are on other hosts.
3. If you disabled any processes for automatically starting Oracle Application Server at the beginning of this procedure, then enable them.

No comments: