Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Database name
"Dima" <dima_at_oblr.kh.energy.gov.ua> wrote in message
news:3AB5A2E6.DBC89FAC_at_oblr.kh.energy.gov.ua...
> Help, please!!!
>
> How can I change a database name on Oracle 8.0.5?
Issue the 'alter database backup controlfile to trace' command. Locate the trace file thus produced (it will be in the User_dump_dest location, as per your init.ora setting). Edit it thus:
Edit your init.ora -it has a parameter there called 'db_name' -that needs to be changed to match whatever new database name you're proposing to set.
Now shutdown the original database (I hope you've got a complete backup!) At the command prompt, set your ORACLE_SID to be an appropriate match for the database you're about to rename. That is, if the SID is currently 'BLAH', change it to be 'NEWBLAH', as per the new name of the database. Now delete all copies of your existing controlfile. If you're nervous, I recommend re-naming them rather than an all-out delete.
Fire up Server Manager.
At the SRVMGR> prompt, type @createconfile.sql (you'll have to put the full
path in if that script is not in the sasme directory as you run Server
Manager from, of course).
Sit back and bite your nails.
If the thing comes up with 'database mounted', you're home and dry. If it
comes up with vague errors about the control file, I've always found that
the thing actually works anyway.
Check your handiwork: 'select * from v$controlfile', 'select * from v$instance' and 'select * from v$database' should prove that everything is in order.
And before doing any of that stuff, you might ask yourself if you *really* need to change your database name, since it involves potentially getting it into a state of non-openness, and definitiely results in a resetlogs, which renders all prior backups useless, and all prior archives (if you have them). Accordingly, having successfully renamed the thing, if you have any sense at all, you will do an immediate 'shutdown immediate', and do a complete, closed database backup.
HTH
Regards
HJR
Received on Mon Mar 19 2001 - 02:51:39 CST
![]() |
![]() |