Hi "guys",
I have a database called TEEDB and I want to rename it to MARKETDB.
Can any one please write down the specific steps involved in doing this for me?
P.S. I am running Oracle 8i(8.1.5) on a UNIX box.
regards,
dorothy
Printable View
Hi "guys",
I have a database called TEEDB and I want to rename it to MARKETDB.
Can any one please write down the specific steps involved in doing this for me?
P.S. I am running Oracle 8i(8.1.5) on a UNIX box.
regards,
dorothy
You need to recreate the db.
Take cold backup and export, then recreate the db using the same init.ora file (but with a different db_name, service_name, etc)
1) Create 815 instance with the same init.ora and different dbname parameter for MARKETDB.
2) Create database name with MARKET DB with the precreated tablespace structure as it is on TEEDB
3) RESTRICT users on TEEDB to access database and have a count and status of objects for verfication purpose.
4) FROM TEEDB: exp userid/password buffer=9999 full=y consistant=y
5) TO MARKETDB: imp userid/password buffer=9999 full=y ignore=y
6) Verify the objects count and status on MARKETDB
7)Compile all the invalid objects.
8) You are good to go....
If size is big you might need to use pipes for your exports
OR databsse clone with cold backup files...
NOTE: Just outlining the process. Check for syntax/parameters of exp/imp and how you want your database from storage/fragmentation considerations.
[Edited by sreddy on 01-08-2001 at 12:08 PM]
I thought you only need to recreate the controlfile.
alter database backup controlfile to trace;
Check the generated tracefile, edit it, change the name here
Change init, ORACLE_SID, etc.
Execute the CREATE CONTROLFILE edited from the tracefile.
See ya!
Ramon procedure is cool and quick...if all you need is just name and nothing else to be changed..... thx Ramon for quick tip.
Dorothy ,
Make sure you start database in Mount mode to create controlfile. I think it allows in Mount, but best is nomount mode as Pando suggests
Refer this metalink doc for details:61590.1
[Edited by sreddy on 01-08-2001 at 12:28 PM]
I think nomount is more appropriate to create control file ;)
Yes, I did it long back. recreating controlfile is sufficient. No need to recreate the DB. Go ahead as Ramon suggested.
thanks to all of you out there
Yes, I also have done the same with recreating controlfile. But don't forget to edit init.ora, oratab, listener.ora, tnsnames.ora etc.
Thanks all!
I am still not quite sure about the recreate control file thing. Do I have to backup control file to trace first ?
How the tablespace be created?
Do I have to create the user account?
Hi
Following steps I have received from Jeff Hunter and I tried it (8.0.5). It worked fine for me.
1. alter system backup controlfile to trace
2. shutdown database (normal or immediate)
3. backup database
4. create new $ORACLE_BASE/admin/$ORACLE_SID directory
5. copy files from $ORACLE_BASE/admin/old_oracle_sid to
$ORACLE_BASE/admin/new_oracle_sid
6. edit init.ora and change any references from old SID to new SID
7. create orapw file (orapw file=orapwNEW_SID)
8. edit trace file
8.1 Get rid of garbage before STARTUP NOMOUNT
8.2 Change CREATE CONTROLFILE REUSE to CREATE CONTROLFILE
REUSE SET
8.3 Comment out RECOVER DATABASE
8.4 Change ALTER DATABASE OPEN to ALTER DATABASE OPEN
RESETLOGS
8.5 Change any references of the old SID to the new SID
9. svrmgrl
10. connect internal
11. @your_trace_file_name_created_in_step_8
12. shutdown (immediate or normal)
13. backup database (don't overwrite step #2)
14. startup database
Why reset logs?