Database changed name using nid option.
1- Database should be in mount mode
2- issue nid command
3- change db name in init.ora file before starting db in mount stage
3- open with open resetlog option
SQL> startup mount pfile=/u01//11.2.0/dbhome_1//dbs/initTESTR121.ora.tmp
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2230072 bytes
Variable Size 1375733960 bytes
Database Buffers 754974720 bytes
Redo Buffers 4947968 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
New DB name will be TESTR12
-bash-3.2$ nid target=/ dbname=TESTR12 logfile=/tmp/nid.log
-bash-3.2$ tail /tmp/nid.log
Instance shut down
Database name changed to TESTR12.
Modify parameter file and generate a new password file before restarting.
Database ID for database TESTR12 changed to 3227523612.
All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID - Completed successfully.
-bash-3.2$
Before restarting change db_name parameter in $ORACLE_HOME/dbs/init.ora file then mount the database
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sun Feb 4 10:21:22 2018
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 8551575552 bytes
Fixed Size 2245480 bytes
Variable Size 1325403288 bytes
Database Buffers 7197425664 bytes
Redo Buffers 26501120 bytes
Database mounted.
SQL> alter database open resetlogs;
Database altered.
SQL> select name from v$database;
NAME
---------
TESTR12
SQL>
1- Database should be in mount mode
2- issue nid command
3- change db name in init.ora file before starting db in mount stage
3- open with open resetlog option
SQL> startup mount pfile=/u01//11.2.0/dbhome_1//dbs/initTESTR121.ora.tmp
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2230072 bytes
Variable Size 1375733960 bytes
Database Buffers 754974720 bytes
Redo Buffers 4947968 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
New DB name will be TESTR12
-bash-3.2$ nid target=/ dbname=TESTR12 logfile=/tmp/nid.log
-bash-3.2$ tail /tmp/nid.log
Instance shut down
Database name changed to TESTR12.
Modify parameter file and generate a new password file before restarting.
Database ID for database TESTR12 changed to 3227523612.
All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID - Completed successfully.
-bash-3.2$
Before restarting change db_name parameter in $ORACLE_HOME/dbs/init.ora file then mount the database
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sun Feb 4 10:21:22 2018
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 8551575552 bytes
Fixed Size 2245480 bytes
Variable Size 1325403288 bytes
Database Buffers 7197425664 bytes
Redo Buffers 26501120 bytes
Database mounted.
SQL> alter database open resetlogs;
Database altered.
SQL> select name from v$database;
NAME
---------
TESTR12
SQL>
Comments
Post a Comment