【转】How to reconfigure Oracle Restart

转自 asmsupportguy 博客

The other day I had to reconfigure an Oracle Restart 12c environment, and I couldn’t find my blog post on that. It turns out that I never published it here, as my MOS document on this topic was created back in 2010 when this blog didn’t exist!

 

The original document was written for Oracle Restart 11gR2, but it is still valid for 12c. Here it is.

 

Introduction

 

This document is about reconfiguring the Oracle Restart. One reason for such action might be the server rename. If the server was renamed and then rebooted, the ASM instance startup would fail with ORA-29701: unable to connect to Cluster Synchronization Service.

 

The solution is to reconfigure Oracle Restart as follows.

 

  1. Remove Oracle Restart configuration

 

This step should be performed as the privileged user (root).

 

# $GRID_HOME/crs/install/roothas.pl -deconfig -force

 

The expected result is “Successfully deconfigured Oracle Restart stack”.

 

  1. Reconfigure Oracle Restart

 

This step should also be performed as the privileged user (root).

 

# $GRID_HOME/crs/install/roothas.pl

 

The expected result is “Successfully configured Oracle Grid Infrastructure for a Standalone Server”

 

  1. Add ASM back to Oracle Restart configuration

 

This step should be performed as the Grid Infrastructure owner (grid user).

 

$ srvctl add asm

 

The expected result is no output, just a return to the operating system prompt.

 

  1. Start ASM instance

 

This step should be performed as the Grid Infrastructure owner (grid user).

 

$ srvctl start asm

 

That should start the ASM instance.

 

Note that at this time there will be no ASM initialization or server parameter file.

 

  1. Recreate ASM server parameter file (SPFILE)

 

This step should be performed as the Grid Infrastructure owner (grid user).

 

Create a temporary initialization parameter file (e.g. /tmp/init+ASM.ora) with the content similar to the this (of course, with your own disk group names):

 

asm_diskgroups=’DATA’,’RECO’

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 the 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

 

  1. Restart HAS stack

 

This step should be performed as the Grid Infrastructure owner (grid user).

 

$ crsctl stop has

 

$ crsctl start has

 

  1. Add components back to Oracle Restart configuration

 

Add the database, the listener and other components, back into the Oracle Restart configuration.

 

7.1. Add database

 

This step should be performed as RDBMS owner (oracle user).

 

In 11gR2 the command is:

 

$ srvctl add database -d db_unique_name -o oracle_home

 

In 12c the command is:

 

$ srvctl add database -db db_unique_name -oraclehome oracle_home

 

7.2. Add listener

 

This step should be performed as the Grid Infrastructure owner (grid user).

 

$ srvctl add listener

 

7.3. Add other components

 

For information on how to add back additional components in 11gR2 see:

Oracle® Database Administrator’s Guide 11g Release 2 (11.2)

Chapter 4 Configuring Automatic Restart of an Oracle Database

Section Configuring Oracle Restart

 

For 12c see:

Oracle® Database Administrator’s Guide 12c Release 1 (12.1)

Chapter 4 Configuring Automatic Restart of an Oracle Database

Section Configuring Oracle Restart

 

Conclusion

 

As noted earlier, I have published a MOS document on this: How to Reconfigure Oracle Restart – MOS Doc ID 986740.1.

Comment

*

沪ICP备14014813号

沪公网安备 31010802001379号