In this Document
Goal |
Solution |
1. Remove Oracle Restart configuration |
2. Reconfigure Oracle Restart |
3. Add ASM back to Oracle Restart configuration |
4. Start up ASM instance |
5. Recreate ASM server parameter file (SPFILE) |
6. Restart HAS stack |
7. Add components back to Oracle Restart Configuration |
7.1. Add database component |
7.2. Add listener component |
7.3. Add other components |
Oracle Database - Enterprise Edition - Version 11.2.0.2 to 12.1.0.2 [Release 11.2 to 12.1]
Information in this document applies to any platform.
This document is about reconfiguring Oracle Restart. One reason for such action might be if the server (host) was renamed. If that was the case and the server was rebooted, the ASM startup would fail with ORA-29701.
The solution is to reconfigure Oracle Restart.
This step should be performed as privileged (root) user.
# $GRID_HOME/crs/install/roothas.pl -deconfig -force
The expected result is "Successfully deconfigured Oracle Restart stack".
This step should also be performed as privileged (root) user.
# $GRID_HOME/crs/install/roothas.pl
The expected result is "Successfully configured Oracle Grid Infrastructure for a Standalone Server"
This step should be performed as Grid Infrastructure owner (grid user).
$ srvctl add asm
The expected result is no output, just a return to the operating system prompt.
This step should be performed as Grid Infrastructure owner (grid user).
$ srvctl start asm
That should start ASM. Note that at this time there will be no ASM initialization or server parameter file.
This step should be performed as Grid Infrastructure owner (grid user). Create a temporary initialization parameter file (e.g. /tmp/init+ASM.ora) with the following content (specify your own disk group names):
asm_diskgroups='DATA','RECO'
instance_type='asm'
large_pool_size=12M
remote_login_passwordfile='EXCLUSIVE'
Mount the disk group where the new server parameter file (SPFILE) will reside (e.g. DATA) and create SPFILE:
$ sqlplus / as sysasm
SQL> alter diskgroup DATA mount;
Diskgroup altered.
SQL> create spfile='+DATA' from pfile='/tmp/init+ASM.ora';
File created.
SQL> show parameter spfile
NAME TYPE VALUE
------- ------- -------------------------------------------------
spfile string +DATA/asm/asmparameterfile/registry.253.707737977
crsctl stop has
crsctl start has
If you had the database, listener and other components, add them back to the Oracle Restart Configuration.
This step should be performed as RDBMS owner (oracle user).
srvctl add database -d -o
This step should be performed as Grid Infrastructure owner (grid user).
srvctl add listener
For information on how to add back additional components, please review: Oracle Database Administrator's Guide 11g Release 2 (11.2) Chapter 4 Configuring Automatic Restart of an Oracle Database Section Configuring Oracle Restart
How to change Hostname / IP for a Grid Infrastructure Oracle Restart Standalone Configuration (SIHA) (文档 ID 1552810.1)
In this Document
Goal |
Solution |
Community Discussions |
References |
Oracle Database - Enterprise Edition - Version 11.2.0.1 to 12.1.0.2 [Release 11.2 to 12.1]
Information in this document applies to any platform.
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.
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:
# <11.2 Grid Infrastructure Oracle Home>/crs/install/roothas.pl -deconfig -force
# <11.2 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
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):
$> <11.2 Grid Infrastructure Oracle Home>/bin/crsctl modify resource "ora.cssd" -init -attr "AUTO_START=1"
3) Restart the OHAS stack as grid or oracle OS user (as the Grid Infrastructure OS owner):
$> <11.2 Grid Infrastructure Oracle Home>/bin/crsctl stop has
$> <11.2 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):
$> <11.2 Grid Infrastructure Oracle Home>/bin/crsctl check has
$> <11.2 Grid Infrastructure Oracle Home>/bin/crsctl check css
$> <11.2 Grid Infrastructure Oracle Home>/bin/ crsctl stat resource
$> <11.2 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 <11.2 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):
$> <11.2 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:
$> <11.2 Grid Infrastructure Oracle Home>/bin/crsctl modify resource "ora.asm" -attr "AUTO_START=1"
9) Make sure the disks are discovered by kfod as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow:
Example:
$> <11.2 Grid Infrastructure Oracle Home>/bin/kfod asm_diskstring='ORCL:*' disks=all
Or
$> <11.2 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
$> <11.2 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:
$> <11.2 Grid Infrastructure Oracle Home>/bin/srvctl modify asm -p <spfile full path>
$> <11.2 Grid Infrastructure Oracle Home>/bin/srvctl modify asm -l LISTENER
14) Validate the OHAS (Oracle Restart) services start as follows:
$> <11.2 Grid Infrastructure Oracle Home>/bin/crsctl stop has
$> <11.2 Grid Infrastructure Oracle Home>/bin/crsctl start has
$> <11.2 Grid Infrastructure Oracle Home>/bin/crsctl stat res
$> <11.2 Grid Infrastructure Oracle Home>/bin/crsctl stat res -t
MOS 上有参考文档 How to change Hostname/ IP in GI standalone (SIHA) (文档 ID 1552810.1)。
文档中对于ASM是采用新创建的PFILE来重新添加ASM实例。其实就使用以前的SPFILE,也可以,只需要记下来,重新配置SPFILE的位置参数就行了。
点击(此处)折叠或打开
如果还有其它地方,像 tnsnames.ora, sqlnet.ora 中,如果有主机名的地方,对应修改以下。
我没有用DB Control,如果有的话,还需要重建DB Control,参考 MOS 文档 Note 278100.1 How To Drop, Create And Recreate the Database Control (DB Control) Release 10g and 11g 278100.pdf
How to Migrate an ASM Oracle Restart Configuration from One Host to Another Host on Unix/Linux on 11.2 or 12c Releases. (文档 ID 2015797.1)
In this Document
Goal |
Solution |
Community Discussions |
References |
Oracle Database - Enterprise Edition - Version 11.2.0.1 to 12.1.0.2 [Release 11.2 to 12.1]
Information in this document applies to any platform.
The present document provides the example about how to migrate an ASM Oracle Restart configuration from one host to another host on Unix/Linux.
You need to follow the next steps to migrate an ASM Oracle Restart configuration from one host to another host on Unix/Linux on 11.2 or 12c releases:
1) Shutdown all the Oracle Services as follows:
$> crsctl stop has
2) Then shutdown the source Linux/Unix host.
3) Disconnect/unplug your Storage and connect it to the new Linux host.
4) Install the ASMLIB on the new hosts (this installation will scan the original disks).
Note: This steps is only required if ASMLIB API was present on the original source host.
5) Then Install the 11.2 Grid Infrastructure Standalone "Software Only" + any required GIPSU on the new hosts to match the original release.
6) Then Install the 11.2 RDBMS Standalone "Software Only" + any required RDBMS PSU on the new hosts to match the original release.
7) Then configure the CSS & OHAS services as root user:
# $<New 11.2 Grid Infrastructure Oracle Home>/crs/install/roothas.pl
8) Please perform the next steps as oracle or grid OS user (Grid Infrastructure OS owner):
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl modify resource "ora.cssd" -attr "AUTO_START=1"
Note: On 12c release you will need to add the -unsupported parameter as follows:
$> $<New 12.1 Grid Infrastructure Oracle Home>/bin/crsctl modify resource "ora.cssd" -attr "AUTO_START=1" -unsupported
9) Restart the OHAS stack as grid or oracle OS user:
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl stop has
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl start has
10) Check the CSS & OHAS state as grid or oracle OS user:
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl check has
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl check css
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/ crsctl stat resource
$> $<New 11.2 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 box and check them again.
11) Remove the Old listener running under the old Grid Infrastructure Oracle Home, thru the NETCA GUI (from the old Grid Infrastructure Oracle Home).
12) Recreate the default listener (LISTENER) using port 1521, thru the NETCA GUI located on the new Grid Infrastructure Oracle Home.
13) Please create the init+ASM.ora file on the $<New 11.2 Grid Infrastructure Oracle Home>/dbs directory with the next parameters:
asm_diskgroups= <list of diskgroups>
asm_diskstring= 'ORCL:*' or '/dev/oracleasm/disks/*'
instance_type='asm'
large_pool_size=12M
14) Add the ASM instance as grid or oracle user or the Grid Infrastructure installation owner and execute:
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/srvctl add asm
15) Enable ASM instance Auto Start as follow:
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl modify resource "ora.asm" -attr "AUTO_START=1"
Note: On 12c release you will need to add the -unsupported parameter as follows:
$> $<New 12.1 Grid Infrastructure Oracle Home>/bin/crsctl modify resource "ora.asm" -attr "AUTO_START=1" -unsupported
16) Make sure the disks are discovered by kfod:
Example:
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/kfod asm_diskstring='ORCL:*' disks=all
Or
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/kfod asm_diskstring='/dev/oracleasm/disks/*' disks=all
17) If so, then startup the ASM instance as follow:
$> export ORACLE_SID=+ASM
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/sqlplus "/as sysasm"
SQL> startup pfile=init+ASM.ora --#init file from point #13
SQL> show parameter asm
18) Validate that the original diskgroup(s) were mounted:
SQL> select name, state from v$asm_diskgroup;
19) Create a new ASM instance spfile:
SQL> create spfile from pfile;
20) Add the new ASM spfile and listener to the new ASM instance resource:
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/srvctl modify asm -p <ASM spfile full path>
$> $<New 11.2 Grid Infrastructure Oracle Home>/bin/srvctl modify asm -l LISTENER
21) Finally validate the OHAS (autostart) services start as follow:
$><New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl stop has
$><New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl start has
$><New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl stat res
$><New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl stat res -t
22) Check the new HAS version as well as follow:
$><New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl query has releaseversion
$><New 11.2 Grid Infrastructure Oracle Home>/bin/crsctl query has softwareversion
23) If you need to add additional OHAS/Restart/SIHA resources (e.g. database instances), then please follow the steps described in the next note (I wrote it):
-O- Reconfiguring & Recreating The 11gR2 Restart/OHAS/SIHA Stack Configuration (Standalone). Document 1422517.1