Re: How to rename a database?
Date: 1996/05/14
Message-ID: <4na36r$1c1c_at_watnews1.watson.ibm.com>#1/1
In <4n5e8j$spc_at_lal.interserv.net>, deangup_at_admin.ci.seattle.wa.us writes:
>I need to rename a database. I thought I could do it with:
>
>ALTER DATABASE RENAME GLOBAL_NAME TO <new_name>;
>
>...and I also adjusted parameter DB_NAME in init.ora, renamed init.ora so the new name was embedded
>in it (init<new_name>.ora) and added an entry for the new name in /etc/oratab. However, when I did
>
>SELECT NAME FROM V$DATABASE
>
>...I still saw the old name. And after shutting down and starting up again, I got the message
>
>ORA-01103 Database name <old_name> in control file is not <new_name>
>
>I thought the ALTER DATABASE would update the control file? Is there more I should do, short of
>dropping and recreating the database? Thanks.
>
>-- Paul de Anguera, City of Seattle / HRIS
You will have to create new control files to rename your database. Basically you will have to:
- Alter database backup controlfile to trace;
- Shutdown
- Edit the trace file to change the DB name; save the create control file portion as a .sql script
- Edit init<SID>.ora to include new DB name
- Rename existing control files to .old
- Connect internal and run the .sql script to recreate your control files.
See the Administrator's Guide for additional information..
M.Landa Received on Tue May 14 1996 - 00:00:00 CEST