APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.
GOAL
This document describes the steps for changing the DB_UNIQUE_NAME for a Real Application cluster database.
SOLUTION
For example, a database that was originally created with Global Database Name "<database>" would have a db_name and db_unique_name of "<database>" and its corresponding CRS database resource would be named "ora.<database>.db". Changing the db_unique_name requires a complete restart of the database.
1) Remove the database, instance and service resources from CRS, this does NOT affect database itself.
$ srvctl stop database -d <database>$ srvctl remove database -d <database>
2) Start the database and change the db_unique_name at database level.
SQL> Startup;
SQL> alter system set db_unique_name=<database>_test scope=spfile sid='*';
SQL> alter system set db_domain=<domain> scope=spfile sid='*'; << only required when db_domain needs to be changed.
SQL> alter database rename global_name to <database>_test.<domain>;
3) Now add the database resource to cluster-level.
$ srvctl add database -d <database>_test -n <node> -o <ORACLE_HOME>
$ srvctl add instance -d <database>_test -i <instance1> -n <node1>
$ srvctl add instance -d <database>_test -i <instance2> -n <node2>
4) Create dependency between database and ASM instance so that database starts after ASM instance starts.
$ srvctl modify instance -d <database>_test -i <instance1> -s +ASM1
$ srvctl modify instance -d <database>_test -i <instance2> -s +ASM2
Please note that, for 11.2, it is no longer required to modify at instance level, it should be done at database level:
srvctl modify database -d <db_unique_name> -a "<diskgroup_list>
5) Create database service, the following example add sevice with both instances as preferred
$ srvctl add service -d <database>_test -s <service> -r "<instance1>,<instance2>"
No comments:
Post a Comment