Re: rename a database

From: David Barbour <david.barbour1_at_gmail.com>
Date: Mon, 19 May 2008 16:26:41 -0400
Message-ID: <69eafc3f0805191326s396803f0q3b7a97d1487804b6@mail.gmail.com>


The NID utility greatly simplifies this. You can change either the database name, the database id, or both. It works the same on both UNIX or Windows.

Check Metalink Note #224226.1. I've had to use this several times to finish off RMAN duplicates on UNIX and once on Windows when I had to change a database name as part of an application upgrade. It's pretty slick.

From the doc:

Change Only the DBNAME


  1. Backup the database
  2. SHUTDOWN IMMEDIATE of the database
  3. STARTUP MOUNT
  4. Open one session and run NID with sysdba privileges % nid TARGET=SYS/password_at_test_db DBNAME=test_db2 SETNAME=Y
    • the value of DBNAME is the new dbname of the database
    • SETNAME must be set to Y. The default is N and causes the DBID to be changed also.
  5. shutdown IMMEDIATE of the database
  6. Set the DB_NAME initialization parameter in the initialization parameter file to the new database name
  7. Create a new password file
  8. Startup of the database(without resetlogs)

On Mon, May 19, 2008 at 2:57 PM, <genegurevich_at_discover.com> wrote:

> Hello :
>
>
> I need to rename an existing database (10.2.3). In the past (about 10 years
> ago and oracle 7) I was able to take the create controlfile command
> (via alter database rebuild controlfile to trace), replace the filesystem
> name and the database name with a new instance name, rename
> all the filesystems accordingly, execute the create controlfile command and
> be done.
>
> As I said I have not done it in about 10 years. Can this still be done like
> that? Am I missing anything?
>
> thank you
>
> Gene Gurevich
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 19 2008 - 15:26:41 CDT

Original text of this message