renaming a database
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: renaming a database

Hybrid View

  1. #1
    Join Date
    Oct 2000
    Posts
    90
    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

  2. #2
    Join Date
    Apr 2000
    Location
    Edison, NJ
    Posts
    759
    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)

  3. #3
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843

    If database size is limited

    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]

  4. #4
    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 Caballero, DBA, rcaballe@yahoo.com

  5. #5
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843

    Cool!

    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]

  6. #6
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    I think nomount is more appropriate to create control file ;)

  7. #7
    Join Date
    Mar 2000
    Location
    CA
    Posts
    317
    Yes, I did it long back. recreating controlfile is sufficient. No need to recreate the DB. Go ahead as Ramon suggested.
    Thanks
    Kishore Kumar

  8. #8
    Join Date
    Oct 2000
    Posts
    90
    thanks to all of you out there

  9. #9
    Join Date
    Jan 2000
    Location
    Silver Spring MD USA
    Posts
    105
    Yes, I also have done the same with recreating controlfile. But don't forget to edit init.ora, oratab, listener.ora, tnsnames.ora etc.

  10. #10
    Join Date
    Nov 2000
    Posts
    51

    clone a database on the same machine

    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?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width