Thursday, October 31, 2019

How to change Hostname / IP for a Grid Infrastructure Oracle Restart Standalone Configuration (SIHA) 11.2 and Later (Doc ID 1552810.1)

In this Document
Goal
Solution
Community Discussions
References


APPLIES TO:

Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.

GOAL

This document provides (in detail) the required & mandatory steps that need to be executed after the hostname was updated/changed/modified.
If you intend to change only the IP address then we dont need to do anything such as deconfig/reconfig.

SOLUTION

 Therefore, please perform the next steps after the hostname was updated/changed/modified in the Oracle Restart configuration:
1) Configure the CSS & OHAS services as root user as follows:
# <Grid Infrastructure Oracle Home>/crs/install/roothas.pl -deconfig -forceFor 18c<Grid Infrastructure Oracle Home>/crs/install/roothas.sh -deconfig -force
# <Grid Infrastructure Oracle Home>/crs/install/roothas.pl
# cd <12.1 Grid infrastructure Oracle Home>/crs/install
# perl roothas.sh -deconfig -force
--This removes any configuration on the system that referenced the old host name.
# cd <12.1 Grid infrastructure Oracle Home>
# ./root.sh
For 12.2,<12.2 Grid infrastructure Oracle Home>/crs/install/roothas.pl                                                                                                                                          Go to the grid home's bin directory. Use the srvctl add database command with the -c SINGLE flag to add the database in an Oracle Restart configuration.
Also use the srvctl add command to add the listener, the Oracle ASM instance, all Oracle ASM disk groups, and any database services to the Oracle Restart configuration.

2) Please perform the next steps as oracle or grid OS user (as the Grid Infrastructure OS owner): 
$> <Grid Infrastructure Oracle Home>/bin/crsctl modify resource "ora.cssd" -init -attr "AUTO_START=1"  -unsupported
 NOTE: "-unsupported" is not required for 11.2 version

3) Restart the OHAS stack as grid or oracle OS user (as the Grid Infrastructure OS owner):
$> <Grid Infrastructure Oracle Home>/bin/crsctl stop has

$> <Grid Infrastructure Oracle Home>/bin/crsctl start has

4) Check the CSS & OHAS state as grid or oracle OS user (as the Grid Infrastructure OS owner):
$> <Grid Infrastructure Oracle Home>/bin/crsctl check has

$> <Grid Infrastructure Oracle Home>/bin/crsctl check css

$> <Grid Infrastructure Oracle Home>/bin/ crsctl stat resource

$> <Grid Infrastructure Oracle Home>/bin/crsctl stat res -t

Note: If the CSS & OHAS service did NOT start, then you will need to reboot the Linux/unix box and check them again.

5) Recreate the default listener (LISTENER) using port 1521 (or using your desired port), thru the NETCA GUI located on the new Grid Infrastructure Oracle Home (or manually if you do not have graphical access) as grid or oracle OS user (as the Grid Infrastructure OS owner):
$> srvctl add listener

$> srvctl start listener

6) Please create the init+ASM.ora file on the <Grid Infrastructure Oracle Home>/dbs directory with the next parameters:
asm_diskgroups= <list of diskgroups>

asm_diskstring= '/dev/oracleasm/disks/*'  

instance_type='asm'

large_pool_size=12M

7) Add the ASM instance as grid or oracle OS user (as the Grid Infrastructure OS owner):
$> <Grid Infrastructure Oracle Home>/bin/srvctl add asm
$> <12.1 Grid Infrastructure Oracle Home>/bin/srvctl add asm

8) Enable ASM instance Auto Start as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow: 
$> <Grid Infrastructure Oracle Home>/bin/crsctl modify resource "ora.asm" -init -attr "AUTO_START=1"  -unsupported
 NOTE: "-unsupported" is not required for 11.2 version

9) Make sure the disks are discovered by kfod as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow:

Example:
$> <Grid Infrastructure Oracle Home>/bin/kfod asm_diskstring='ORCL:*' disks=all

Or
$> <Grid Infrastructure Oracle Home>/bin/kfod asm_diskstring='<full path ASM disks location>/*' disks=all

10) If so, then startup the ASM instance as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow:
$> export ORACLE_SID=+ASM

$> <Grid Infrastructure Oracle Home>/bin/sqlplus “/as sysasm”

SQL> startup pfile=init+ASM.ora --#init file from point #6

SQL> show parameter asm

11) Validate that the candidate disks are being discovered:
SQL> select  path  from v$asm_disk;

12) Create a new ASM instance spfile:
SQL> create spfile from pfile;

13) Add the new ASM spfile and listener to the new ASM instance resource:
$> <Grid Infrastructure Oracle Home>/bin/srvctl modify asm  -p <spfile full path>

$> <Grid Infrastructure Oracle Home>/bin/srvctl modify asm  -l LISTENER

14) Validate the OHAS (Oracle Restart) services start as follows: 
$> <Grid Infrastructure Oracle Home>/bin/crsctl  stop has

$> <Grid Infrastructure Oracle Home>/bin/crsctl  start has

$> <Grid Infrastructure Oracle Home>/bin/crsctl  stat res

$> <Grid Infrastructure Oracle Home>/bin/crsctl  stat res -t



Community Discussions

Still have questions? Use the communities window below to search for similar discussions or start a new discussion on this subject. (Window is the live community not a screenshot)
Click here to open in main browser window

REFERENCES

NOTE:363609.1 - Preparing For Changing the IP Address, Hostname or Domain Of Oracle Database Servers
NOTE:1645523.1 - Alternative Procedure To Upgrade ASM From Release 10.2 Or 11.1 To Release 11.2.0.# or To 12.1.0.1 On Unix/Linux Configurations (Standalone) Using ASM Role separation.
NOTE:986740.1 - How to Reconfigure Oracle Restart
NOTE:1434351.1 - Alternative Way To Upgrade An ASM Standalone Configuration From Release 11.2.0.<#> to release 11.2.0.<#>.
NOTE:293678.1 - How To Reconfigure DB Control After a Hostname, Domainname or Listener Change Has Occurred On The Server
NOTE:1422517.1 - Reconfiguring & Recreating The 11gR2/12cR1 Restart/OHAS/SIHA Stack Configuration (Standalone) / How to Reconfigure Oracle Restart
NOTE:887658.1 - Reconfigure HAS and CSS for nonRAC ASM on 11.2
https://docs.oracle.com/database/121/LADBI/app_ts.htm#LADBI7947

No comments:

Post a Comment

Database Options/Management Packs Usage Reporting for Oracle Databases 11.2 and later (Doc ID 1317265.1)

  Database Options/Management Packs Usage Report You can determine whether an option is currently in use in a database by running options_pa...