Tuesday, June 2, 2009

Oracle- Rename Database

Rename the Oracle Database

1) Full Database Backup

2) conn SYS/ORACLE AS SYSDBA

3) ALTER DATABASE BACKUP CONTROLFILE TO TRACE RESETLOGS;

4) Locate the latest dump file in your USER_DUMP_DEST directory (show parameter USER_DUMP_DEST) - rename it to something like

dbrename.sql.

5) Edit dbrename.sql, remove all headers and comments, and change the database's name.

6) Change "CREATE CONTROLFILE REUSE ..." to "CREATE CONTROLFILE SET ...".

7) Shutdown the database (use SHUTDOWN NORMAL or IMMEDIATE, don't ABORT!)

8) Run dbrename.sql.

9) ALTER DATABASE RENAME GLOBAL_NAME TO new_db_name;

No comments:

Post a Comment

Followers