Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Rename database

Re: Rename database

From: koert54 <koert54_at_nospam.com>
Date: Thu, 04 Oct 2001 17:42:02 GMT
Message-ID: <Kb1v7.85376$6x5.19000573@afrodite.telenet-ops.be>


Hi Franky !

yes it is possible to change the DB name. The maximum length is 4 characters in Oracle 7, 8.0 and 8 characters in Oracle 8i (if I'm not mistaking)

Here's (in short) the procedure

- alter database backup controlfile to trace ;
- check udump for the trace file - rename to something like control.sql
- edit control.sql

    -> remove all comments & crap - also remove the 'recover database' and 'alter database open' statement at the end

    -> change 'reuse' to 'set'
    -> change the dbname to something else
    -> change 'noresetlogs' to 'resetlogs'
- shutdown the database (warning - don't do a shutdown abort because you're going to do a resetlogs afterwards!)
- make a backup if you're faint of heart
- delete the controlfiles (better - move them !)
- sqlplus internal (or svrmgrl \ connect internal)
- start control.sql
- alter database open resetlogs
- alter database rename global_name to <<new name>>

Cheers !
koert

"Franky Thiel" <franky.thiel_at_infohos.be> wrote in message news:3bbc4cd5$0$36471$ba620e4c_at_news.skynet.be...
> Is it possible to rename a database or should I do an export from the old
> database, drop database and recreate new database and do an import ?
>
> What is the maximum length of the name of a database in Oracle ?
>
>
>
> Regards and thanks in advance,
>
>
>
> Franky
>
>
>
Received on Thu Oct 04 2001 - 12:42:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US