Change SID

Embed Size (px)

Citation preview

  • 7/25/2019 Change SID

    1/2

    I CHANGED ORACLE_SID: FROM DEVDB TO SIEBDEV===================================================- Shutdown the instance

    - Backup all control, redo, and data files.

    - Go through the .profile, .cshrc, .login, oratab, tnsnames.ora, (for SQL*Netversion 2), and redefine the ORACLE_SID environment variable to a new value.

    - Change locations to the "dbs" directory

    % cd $ORACLE_HOME/dbs

    and rename the following files:

    o init.ora (or use pfile to point to the init file.)o control file(s). This is optional if you do not rename any

    of the controlfiles, and the control_files parameter is used.

    The "control_files" parameter is set in the "init.ora" file or in afile itreferences with the ifile parameter. Make sure that the control_files parameter doesnot point to old file names, if you have renamed them.

    o "crdb.sql" & "crdb2.sql", This is optional. These are onlyused atdatabase creation.

    Change locations to the "rdbms/admin" directory

    % cd $ORACLE_HOME/rdbms/admin

    and rename the file:

    o startup.sql. This is optional. On some platforms, this file maybe in the"$ORACLE_HOME/rdbms/install" directory. Make sure that the contents of this file do notreference old init.ora files that have been renamed. This file simplifiesthe"startup exclusive" process to start your database.

    To rename the database files and redo log files, you would follow the instructions

    in .

    Change the ORACLE_SID environment variable to the new value.

    Check in the "$ORACLE_HOME/dbs" directory to see if the password file has beenenabled. If enabled, the file "orapw" will exist and a new password file forthe new SID must be created (renaming the old file will not work). If "orapw"does not exist, skip to step 9. To create a new password file, issue the followingcommand as oracle owner:

    orapwd file=orapw password=?? entries=

  • 7/25/2019 Change SID

    2/2

    permission to start the database instance>

    Start up the database and verify that it works. Once you have done this, shutdownthe database and take a final backup of all control, redo, and data files.

    When the instance is started, the control file is updated with the current

    ORACLE_SID.