How to Rename Oracle Database

How to Rename Oracle Database

1 – Create Controlfile to trace

SQL> alter database backup controlfile to trace;

Database altered.

2- Check existing database name 
SQL> select name from v$database;

NAME
———
TESTDB

SQL>shutdown immediate

 

3- Startup nomount

SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 313860096 bytes
Fixed Size 1336232 bytes
Variable Size 201329752 bytes
Database Buffers 104857600 bytes
Redo Buffers 6336512 bytes
SQL> sho parameter db_name

NAME TYPE VALUE
———————————— ———– ——————————
db_name string orcldb
SQL>

4 -Copy and past the controlfile content from trace file and update as it is under

SQL> CREATE CONTROLFILE set DATABASE “ORCLDB” RESETLOGS NOARCHIVELOG
MAXLOGFILES 32
2 3 MAXLOGMEMBERS 3
4 MAXDATAFILES 200
5 MAXINSTANCES 1
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 ‘/u02/app/testdb/redo1a.log’ SIZE 10M BLOCKSIZE 512,
9 GROUP 2 ‘/u02/app/testdb/redo2a.log’ SIZE 10M BLOCKSIZE 512
— STANDBY LOGFILE
10 11 DATAFILE
12 ‘/u02/app/testdb/system01.dbf’,
13 ‘/u02/app/testdb/sysaux01.dbf’,
14 ‘/u02/app/testdb/undotbs01.dbf’,
15 ‘/u02/app/testdb/users01.dbf’
16 CHARACTER SET AL32UTF8
17 ;

Control file created.

SQL>

5 – Open database with resetlogs
SQL> alter database open resetlogs;

Database altered.

6- Confirm Database Name

SQL> select open_mode,name from v$database;

OPEN_MODE NAME
——————– ———
READ WRITE ORCLDB

SQL>

 

Advertisements

About Sher khan

Senior Oracle DBA, Oracle 10g , Oracle 11g OCE ,Oracle 12C and Oracle 11g OPN certified Specialist, OCP Certified in Oracle 9i,10g , 11g and 12C. I am working in Oracle technology since 2004. Currently working in U.A.E Email: sher487@hotmail.com
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s