Re: Challenge: Rename a database

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 27 Apr 2001 23:06:44 +0200
Message-ID: <tejnn5h70ddv3c_at_beta-news.demon.nl>


[Quoted] [Quoted] "John Skyner" <jskyner_at_jtc-computing.co.uk> wrote in message news:tejlngkb1vaj00_at_xo.supernews.co.uk...
> Does anybody know how a database can be renamed?
>
> The scenario is this:
>
> I have a production database (8.0.6), running on an RS/6000 SP node (AIX
> 4.3.3), which needs to be cloned on another (development) server.
>
> Basically, I have performed a bootable (MKSYSB) backup of the live server,
> which I have used to clone onto the development server. I also stopped the
> database and completed a full (ADSM) backup of all of the external
> filesystems, which I have also used to create all of the external Volume
> Groups and logical volumes required by the database.
>
> Before I start the database, I need to rename it.
>
> Please note that I am not a qualified DBA and I am merely trying to find
 out
> how this is done because my DBAs don't know how to do it, but I have known
> past associates who have done this on a regular basis.
>
> If you could provide step-by-step instructions by email
> (jskyner_at_jtc-computing.co.uk), or point me towards a document available on
> the web, it would be most appreciated.
>
> Regards,
>
> John
>
>

You into svrmgrl
and connect as internal
Now issue the following command
alter database backup controlfile to trace;

You now will have a new trace file in your user_dump_dest directory. (If you don't know which directory that is, type show parameter user_dump_dest)
shell out of svrmgrl by typing !
edit the tracefile you can find with an ls It will read
create controlfile database <databasename> etc.
change that in
create controlfile *set* database <new databasename> leaving the rest unchanged.
Shut the database
edit the init<sid>.ora (in $ORACLE_HOME/dbs) and change the db_name parameter
Now restart svrmgrl
and connect internal
run the tracefile by
_at_<tracefilename> or whatever name you gave it.

That should be all!

Hth,

Sybrand Bakker, Oracle DBA Received on Fri Apr 27 2001 - 23:06:44 CEST

Original text of this message