DATABASE NAME =XRXDB
instance_name=XRXDB1( on node 1 ) and XRXDB2 ( node 2 )
echo $ORACLE_SID
XRXDB1
[1] Create pfile from spfile in non-default location.
SQL> create pfile=’/u02/oraclenetwork/XRXDB/initXRXDB.ora’ from spfile;
File created.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
[server313:XRXDB1]$ pwd
/u01/app/oracle/product/11.2.0.3/db_1/dbs
[server313:XRXDB1]$ cd
[server313:XRXDB1]$ cd /u02/oraclenetwork/XRXDB/
[server313:XRXDB1]$ ls -ltr
total 3678728
[server313:XRXDB1]$ cp initXRXDB.ora initXRXDB.ora_bkp
[server313:XRXDB1]$ vi initXRXDB.ora // comment all the RAC specific parameters as shown below
[server313:XRXDB1]$ s
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
[2] Mount The Database using new pfile as shown below
Note:SID is same as earlier
[server313:XRXDB1]$ pwd
/u02/oraclenetwork/XRXDB
SQL> startup mount pfile=’/u02/oraclenetwork/XRXDB/initXRXDB.ora’;
ORACLE instance started.
Total System Global Area 3106619392 bytes
Fixed Size 2232392 bytes
Variable Size 1862275000 bytes
Database Buffers 1224736768 bytes
Redo Buffers 17375232 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
Note:Below is sample pfile
comment the XRXDB2 parameters–
#XRXDB2.instance_number=2
#XRXDB2.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.1)(PORT=1525))))’
[server313:XRXDB1]$ cat /u02/oraclenetwork/XRXDB/initXRXDB.ora
#*.cluster_database=true
*.compatible=’11.2.0.0.0′
*.control_files=’+DATA_GRP_1/xrxdb/controlfile/current.272.872156757′,’+ARCH_GRP_1/xrxdb/controlfile/current.1623.871600291′
*.db_block_size=8192
*.db_create_file_dest=’+DATA_GRP_1′
*.db_domain=”
*.db_name=’XRXDB’
*.db_recovery_file_dest=’+ARCH_GRP_1′
*.db_recovery_file_dest_size=6005194752
*.diagnostic_dest=’/u01/app/oracle’
XRXDB1.instance_number=1
#XRXDB2.instance_number=2
#XRXDB2.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.1)(PORT=1525))))’
*.log_archive_format=’%t_%s_%r.dbf’
*.memory_target=3111124992
*.open_cursors=300
*.processes=150
*.remote_listener=’racdev-scan.corp.otn.com:1521′
*.remote_login_passwordfile=’exclusive’
XRXDB1.thread=1
#XRXDB2.thread=2
#XRXDB2.undo_tablespace=’UNDOTBS1′
XRXDB1.undo_tablespace=’UNDOTBS2′
Now use the nid utility :
[server313:XRXDB1]$ nid TARGET=sys/oracle dbname=xrxdbnew
DBNEWID: Release 11.2.0.3.0 – Production on Wed Feb 25 08:40:51 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to database XRXDB (DBID=3599526942)
Connected to server version 11.2.0
Control Files in database:
+DATA_GRP_1/xrxdb/controlfile/current.272.872156757
+ARCH_GRP_1/xrxdb/controlfile/current.1623.871600291
Change database ID and database name XRXDB to XRXDBNEW? (Y/[N]) => Y
Proceeding with operation
Changing database ID from 3599526942 to 3696324691
Changing database name from XRXDB to XRXDBNEW
Control File +DATA_GRP_1/xrxdb/controlfile/current.272.872156757 – modified
Control File +ARCH_GRP_1/xrxdb/controlfile/current.1623.871600291 – modified
Datafile +DATA_GRP_1/xrxdb/datafile/system.304.87215712 – dbid changed, wrote new name
Datafile +DATA_GRP_1/xrxdb/datafile/sysaux.299.87215712 – dbid changed, wrote new name
Datafile +DATA_GRP_1/xrxdb/datafile/undotbs1.298.87215712 – dbid changed, wrote new name
Datafile +DATA_GRP_1/xrxdb/datafile/undotbs2.297.87215712 – dbid changed, wrote new name
Datafile +DATA_GRP_1/xrxdb/datafile/users.296.87215712 – dbid changed, wrote new name
Datafile +DATA_GRP_1/xrxdb/tempfile/temp.300.87160030 – dbid changed, wrote new name
Control File +DATA_GRP_1/xrxdb/controlfile/current.272.872156757 – dbid changed, wrote new name
Control File +ARCH_GRP_1/xrxdb/controlfile/current.1623.871600291 – dbid changed, wrote new name
Instance shut down
Database name changed to XRXDBNEW.
Modify parameter file and generate a new password file before restarting.
Database ID for database XRXDBNEW changed to 3696324691.
All previous backups and archived redo logs for this database are unusable.
Database is not aware of previous backups and archived logs in Recovery Area.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID – Completed succesfully.
Mount Database with new pfile.
[server313:RAC11]$ export ORACLE_SID=XRXDBNEW
[server313:XRXDBNEW]$ s
SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 25 08:59:19 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount pfile=’/u02/oraclenetwork/XRXDB/initXRXDBNEW.ora’;
ORACLE instance started.
Total System Global Area 3106619392 bytes
Fixed Size 2232392 bytes
Variable Size 1711280056 bytes
Database Buffers 1375731712 bytes
Redo Buffers 17375232 bytes
Database mounted.
SQL> select status from v$instance;
STATUS
————
MOUNTED
SQL> select name from v$database;
NAME
———
XRXDBNEW
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open RESETLOGS;
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE
——————–
READ WRITE
SQL> create spfile=’+DATA_GRP_1/XRXDB/spfileXRXDBNEW.ora’ from pfile=’/u02/oraclenetwork/XRXDB/XRXDBNEW.ora’;
File created.
SQL> !echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0.3/db_1
SQL> select name from v$database;
NAME
———
XRXDBNEW
Register Database with the Cluster.
[server313:XRXDBNEW]$ srvctl add database -d XRXDBNEW -o /u01/app/oracle/product/11.2.0.3/db_1 -r primary -s OPEN -p +DATA_GRP_1/XRXDB/spfileXRXDBNEW.ora
[server313:XRXDBNEW]$ srvctl add instance -d XRXDBNEW -i XRXDBNEW1 -n server313
[server313:XRXDBNEW]$ srvctl add instance -d XRXDBNEW -i XRXDBNEW2 -n usa0300lx575
[server313:XRXDBNEW]$ srvctl config database -d XRXDNEW -a
PRCD-1120 : The resource for database XRXDNEW could not be found.
PRCR-1001 : Resource ora.xrxdnew.db does not exist
[server313:XRXDBNEW]$ srvctl config database -d XRXDBNEW -a
Database unique name: XRXDBNEW
Database name:
Oracle home: /u01/app/oracle/product/11.2.0.3/db_1
Oracle user: oracle
Spfile: +DATA_GRP_1/XRXDB/spfileXRXDBNEW.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: XRXDBNEW
Database instances: XRXDBNEW1,XRXDBNEW2
Disk Groups:
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed