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

Thread: Rename the database name

  1. #1
    Join Date
    Jan 2001
    Posts
    230
    How can I rename the database from xyz to abc?
    Thanks.

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    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
    Jeff Hunter

  3. #3
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    [url]http://www.dbasupport.com/forums/showthread.php?threadid=5586[/url]

  4. #4
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    There was a discussion on this in the past --

    [url]http://ora.dbasupport.com/forums/showthread.php?threadid=5586[/url]


    - Rajeev



  5. #5
    Join Date
    Apr 2000
    Location
    Baltimore, MD
    Posts
    759
    1. backup controlfile to trace
    2. take cold backup
    3. rename parameters like db_name, service_name, instance_name in init.ora
    4. edit the trace file to specify new db name
    5. recreate the controlfile at nomount

  6. #6
    Join Date
    Mar 2000
    Location
    CA
    Posts
    317
    Take the controlfile to trace. Change it in that. change the DB name init.ora. Create the controlfile

    And restart the database.
    Thanks
    Kishore Kumar

  7. #7
    Join Date
    Jan 2001
    Posts
    230
    Jeff:

    I followed the steps as suggested and I am getting following error

    SVRMGR> @cntrlbak.ctl
    LRM-00109: could not open parameter file '/opt/app/oracle/product/8.0.5/dbs/initOLD_DB_NAME.ora'
    ORA-01078: failure in processing system parameters
    CREATE CONTROLFILE REUSE SET DATABASE "NEW_DB_NAME" NORESETLOGS NOARCHIVELOG
    *
    ORA-01034: ORACLE not available
    ALTER DATABASE OPEN RESETLOGS
    *
    ORA-01034: ORACLE not available

    Let me know, what could be wrong...

    Thanks.

  8. #8
    Join Date
    Jan 2000
    Location
    Silver Spring MD USA
    Posts
    105
    set $ORACLE_SID=newsid

    Your environment is still set to the old sid, so change it to the new sid and try again from step 9.
    Be sure to go and edit oratab, tnsnames.ora and listener.ora

  9. #9
    Join Date
    Jan 2001
    Posts
    230

    You are right.

    I made changes to listerner.
    Do I need to shutdown the listerner and startup again?

    Thanks.

  10. #10
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    you can just RELOAD the listener.

    lsnrctl> RELOAD


    - Rajeev

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