Chinaunix首页 | 论坛 | 博客
  • 博客访问: 11699293
  • 博文数量: 8065
  • 博客积分: 10002
  • 博客等级: 中将
  • 技术积分: 96708
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-16 17:06
文章分类

全部博文(8065)

文章存档

2008年(8065)

分类: 服务器与存储

2008-07-16 13:58:14

1. Shutdown the instance

2. Backup all control, redo, and data files.

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

  For example, search through disks and do a grep ORACLE_SID *

4. 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 a file it references with the

    ifile parameter. Make sure that the control_files
    parameter does not point to old
    file names, if you have renamed them.
  o  "crdb.sql" & "crdb2.sql", This is optional.
    These are only used at database creation.

5. 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 may be in the "$ORACLE_HOME/rdbms/install" directory.
Make sure that the contents of this file do not reference old
init.ora files that have been renamed. This file
simplifies the "startup exclusive" process to start your
database.

6. To rename the database files and redo log files if need be.

7. Change the ORACLE_SID environment variable to the new value.


8. Check in the "$ORACLE_HOME/dbs" directory to see if the
password   file has been enabled. If enabled, the file
"orapw" will exist and a new password file for the 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 following command as oracle
owner:

    orapwd file=orapw password=?? entries=users to be granted permission to start the database instance>

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

10. When the instance is started, the control file is updated
with the current ORACLE_SID.
阅读(678) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~