This module describes how you can change the value of ORACLE_SID.
This module discusses the following:
| Overview | ||
| Changing ORACLE_SID On UNIX | ||
Move your mouse over this icon to show all screenshots.
You can also move your mouse over each individual icon to see only the screenshot
associated with it.
In this lesson you will learn how to change the value of ORACLE_SID.
You can change the value of ORACLE_SID by completing the following steps:
| 1. |
Invoke SQL*Plus and connect as a user with SYSDBA privileges.
|
| 2. |
You can determine the current value of ORACLE_SID by performing the following query: SELECT instance
|
| 3. |
Make a whole (complete or full) database backup using Recovery Manager or operating system commands.
|
| 4. |
If you did not shut down your instance to make a backup, shut down the instance using the NORMAL, IMMEDIATE, or TRANSACTIONAL options: SHUTDOWN IMMEDIATE
|
| 5. |
Change the value of ORACLE_SID to your new value in your .profile, .cshrc, .login, oratab, and tnsnames.ora files.
|
| 6. |
Rename the init<SID>.ora and spfile<SID>.ora files in the $ORACLE_HOME/dbs directory using your new ORACLE_SID value.
|
| 7. |
Optionally, rename the control files. If you rename them be sure to update the CONTROL_FILES initialization parameter.
|
| 8. |
Optionally, rename the crdb<SID>.sql and crdb2<SID>.sql files. These files are only used at database creation time.
|
| 9. |
Rename the data files and redo log files. See the Renaming and Moving Data Files module for additional information.
|
| 10. |
Change the ORACLE_SID environment variable to your new value. You can use the following command in the C shell: %setenv ORACLE_SID <NEW_SID>
|
| 11. |
Create a new password file using the ORAPWD utility: orapwd file=orapw<SID> password=<your password> entries=
|
| 12. |
Start the instance and open the database: STARTUP
|
| 13. |
Verify your change by issuing the following query: SELECT instance FROM v$thread;
|
| 14. |
Make a new whole database backup using RMAN or operating system commands.
|