RENAME DATABASE 11gR2
Shutdown the database
Start in Mount and see all the steps
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup mount
ORACLE instance started.
Total System Global Area 1.2831E+10 bytes
Fixed Size 2170304 bytes
Variable Size 2248147520 bytes
Database Buffers 1.0536E+10 bytes
Redo Buffers 44793856 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs]
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] nid TARGET=system/XXXXX DBNAME=MANDYTEST1 SETNAME=Y
DBNEWID: Release 11.2.0.2.0 - Production on Thu Sep 29 13:27:29 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to database MANPREET01 (DBID=3591888462)
Connected to server version 11.2.0
Control Files in database:
/d1/oradata/mandydb01/control01.ctl
/d1/oradata/mandydb01/control02.ctl
/d1/oradata/mandydb01/control03.ctl
Change database name of database MANPREET01 to MANDYTEST1? (Y/[N]) => Y
Proceeding with operation
Changing database name from MANPREET01 to MANDYTEST1
Control File /d1/oradata/mandydb01/control01.ctl - modified
Control File /d1/oradata/mandydb01/control02.ctl - modified
Control File /d1/oradata/mandydb01/control03.ctl - modified
Datafile /d1/oradata/mandydb01/system01.db - wrote new name
Datafile /d1/oradata/mandydb01/undotbs1.db - wrote new name
Datafile /d1/oradata/mandydb01/sysaux01.db - wrote new name
Control File /d1/oradata/mandydb01/control01.ctl - wrote new name
Control File /d1/oradata/mandydb01/control02.ctl - wrote new name
Control File /d1/oradata/mandydb01/control03.ctl - wrote new name
Instance shut down
Database name changed to MANDYTEST1.
Modify parameter file and generate a new password file before restarting.
Succesfully changed database name.
DBNEWID - Completed succesfully.
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] vi initmandydb01.ora
"initmandydb01.ora" 49 lines, 2038 characters
'
*.db_name='MANDYTEST1'
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] ls -lrt
-rw-r--r-- 1 oracle oinstall 2038 Sep 29 13:29 initmandydb01.ora
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Production on Thu Sep 29 13:30:11 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1.2831E+10 bytes
Fixed Size 2170304 bytes
Variable Size 2248147520 bytes
Database Buffers 1.0536E+10 bytes
Redo Buffers 44793856 bytes
Database mounted.
Database opened.
SQL>
SQL> SELECT name FROM v$database;
NAME
---------
MANDYTEST1
SQL> SHOW parameter db_name
NAME TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
db_name string
MANDYTEST1
Shutdown the database
Start in Mount and see all the steps
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup mount
ORACLE instance started.
Total System Global Area 1.2831E+10 bytes
Fixed Size 2170304 bytes
Variable Size 2248147520 bytes
Database Buffers 1.0536E+10 bytes
Redo Buffers 44793856 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs]
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] nid TARGET=system/XXXXX DBNAME=MANDYTEST1 SETNAME=Y
DBNEWID: Release 11.2.0.2.0 - Production on Thu Sep 29 13:27:29 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to database MANPREET01 (DBID=3591888462)
Connected to server version 11.2.0
Control Files in database:
/d1/oradata/mandydb01/control01.ctl
/d1/oradata/mandydb01/control02.ctl
/d1/oradata/mandydb01/control03.ctl
Change database name of database MANPREET01 to MANDYTEST1? (Y/[N]) => Y
Proceeding with operation
Changing database name from MANPREET01 to MANDYTEST1
Control File /d1/oradata/mandydb01/control01.ctl - modified
Control File /d1/oradata/mandydb01/control02.ctl - modified
Control File /d1/oradata/mandydb01/control03.ctl - modified
Datafile /d1/oradata/mandydb01/system01.db - wrote new name
Datafile /d1/oradata/mandydb01/undotbs1.db - wrote new name
Datafile /d1/oradata/mandydb01/sysaux01.db - wrote new name
Control File /d1/oradata/mandydb01/control01.ctl - wrote new name
Control File /d1/oradata/mandydb01/control02.ctl - wrote new name
Control File /d1/oradata/mandydb01/control03.ctl - wrote new name
Instance shut down
Database name changed to MANDYTEST1.
Modify parameter file and generate a new password file before restarting.
Succesfully changed database name.
DBNEWID - Completed succesfully.
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] vi initmandydb01.ora
"initmandydb01.ora" 49 lines, 2038 characters
'
*.db_name='MANDYTEST1'
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] ls -lrt
-rw-r--r-- 1 oracle oinstall 2038 Sep 29 13:29 initmandydb01.ora
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Production on Thu Sep 29 13:30:11 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1.2831E+10 bytes
Fixed Size 2170304 bytes
Variable Size 2248147520 bytes
Database Buffers 1.0536E+10 bytes
Redo Buffers 44793856 bytes
Database mounted.
Database opened.
SQL>
SQL> SELECT name FROM v$database;
NAME
---------
MANDYTEST1
SQL> SHOW parameter db_name
NAME TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
db_name string
MANDYTEST1
No comments:
Post a Comment