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: renaming a database

Re: renaming a database

From: <glennbaron_at_my-deja.com>
Date: 2000/06/14
Message-ID: <8i7ea9$dha$1@nnrp1.deja.com>#1/1

He he. I've just spent many happy hours doing this, after much practice on a little test d/b set up for the purpose. Notes 15390.1 and 9560.1 from Metalink were a great help.
I'd strongly advise anybody trying this on a production d/b to trial it to perfection before risking your db. During 'practice' I made seemingly trivial errors which led to Oracle demanding recovery from archived logs. This was nice, as the test db wasn't running in archivelog mode :> Applying an on-line redo did the trick, but I'd have been sh#%*ing bricks had it happened to our real db. To tidy up, you'll probably want to rename data files/physical paths (note 9560. Just use 'Alter database..' for all of the data files, it's simpler). Also nobody has mentioned editing the DB_NAME in init.ora, or exporting the new ORACLE_SID. Otherwise when you go looking for Oracle processes you'll still see the old SID.

Cheers

Glenn Baron

In article <960927868.18131.4.pluto.d4ee154e_at_news.demon.nl>,   "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
> Answers embedded
> "Lee" <feigenb_at_is01.fas.harvard.edu> wrote in message
> news:slrn8kd0tv.9ts.feigenb_at_is01.fas.harvard.edu...
> > Thanks, Sybrand...
> >
> > That's worked so far, but I still have a couple questions. If the
> > answers to these are found in documentation online, please point me
 to
> > it (I realize these are very elementary questions): [I'm running
 Oracle
> > 8.1.6 on Redhat Linux]
> >
> > -- How do I 'run' the trace file in sever manager?
> @<filename> just as in sqlplus

>
> > -- To delete a database, does deleting all the relevant datafiles
 and
> > relevant files relating to the instance suffice?
> >
> and edit /etc/oratab of course

>

> > Thanks again,
> > Lee
> >
> > On Tue, 13 Jun 2000 19:15:32 +0200, Sybrand Bakker
 <postbus_at_sybrandb.demon.nl> wrote:
> > >The proper way to do it is
> > >alter database backup controlfile to trace
> > >The trace file will be in the directory pointed to by the
 user_dump_dest
> > >parameter.
> > >Now edit the file changing the database name
> > >and run it using whatever version of server manager is appropiate
 for
 your
> > >otherwise unknown platform.
> > >The other command just does what it does: it renames the global
 name
 which
> > >is composed of the db_name, and the db_domain parameter.
> > >
> > >Hth,
> > >
> > >Sybrand Bakker, Oracle DBA
> > >
> > >
> > >"Lee" <feigenb_at_is01.fas.harvard.edu> wrote in message
> > >news:slrn8kcq1k.jfh.feigenb_at_is01.fas.harvard.edu...
> > >> I tried poking around this newsgroup archives and docs to see
> > >> how to rename a database...
> > >>
> > >> I tried doing: alter database <name> rename global_name to
 <newname>
> > >>
> > >> which claimed to have succeeded but didn't seem to do anything...
> > >>
> > >> So I tried manually moving all the files and replacing all
 occurrences
> > >> of <name> with <newname> but now when I startup the database I
 receive
> > >> an ORA-01103 error that the database name doesn't match the
 database
> > >> name in the control files.
> > >>
> > >> Is there a way to change the database name in the control files
 at the
> > >> point i'm at? Otherwise if I go back and rename everything to the
 original
> > >> database name and get that started-up, how do I correctly go
 about
> > >> renaming the database?
> > >>
> > >> on a (slightly) related note, what's the 'proper' method for
 deleting a
> > >> database and associated instance completely?
> > >>
> > >> Thanks in advance,
> > >> Lee
> > >>
> > >
> > >

>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Jun 14 2000 - 00:00:00 CDT

Original text of this message

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