重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: 郑全
打印 上一主题 下一主题

手工升级到oracle 10gR2 的步骤

[复制链接]
21#
 楼主| 发表于 2013-1-3 14:20:28 | 只看该作者

第十九步:关闭数据库

Step 19:

Shutdown the database.

$ sqlplus '/as sysdba'
SQL> shutdown immediate;

回复 支持 反对

使用道具 举报

22#
 楼主| 发表于 2013-1-3 14:21:32 | 只看该作者

第二十步:执行数据库冷备份

Step 20:

Perform a full cold backup (or an online backup using RMAN).

You can either do this by manually copying the files or sign on to RMAN:

$ rman "target / nocatalog"

And issue the following RMAN commands:

RUN
{
ALLOCATE CHANNEL chan_name TYPE DISK;
BACKUP DATABASE FORMAT 'some_backup_directory%U' TAG before_upgrade;
BACKUP CURRENT CONTROLFILE TO 'save_controlfile_location';
}
回复 支持 反对

使用道具 举报

23#
 楼主| 发表于 2013-1-3 14:23:14 | 只看该作者

第二十一步:调整初始参数

Upgrading to the New Oracle Database 10g Release 2

Step 21:

Update the init.ora file:

- Make a backup of the old init.ora file

- Copy it from the old (pre-10.2) ORACLE_HOME to the new (10.2) ORACLE_HOME

On Unix/Linux, the default location of the file is the $ORACLE_HOME/dbs directory

- Comment out any obsoleted parameters (listed in appendix A).

- Change all deprecated parameters (listed in appendix B).

- Set the COMPATIBLE initialization parameter to an appropriate value. If you are
upgrading from 8.1.7.4 then set the COMPATIBLE parameter to 9.2.0 until after the
upgrade has been completed successfully. If you are upgrading from 9.2.0 or 10.1.0
then leave the COMPATIBLE parameter set to it's current value until the upgrade
has been completed successfully. This will avoid any unnecessary ORA-942 errors
from being reported in SMON trace files during the upgrade (because the upgrade
is looking for 10.2 objects that have not yet been created)

- If you have the parameter NLS_LENGTH_SEMANTICS currently set to CHAR, change the value
to BYTE during the upgrade (to avoid the issue described in Note:4638550.8)

- Verify that the parameter DB_DOMAIN is set properly.

- Make sure the PGA_AGGREGATE_TARGET initialization parameter is set to
at least 24 MB.

- Ensure that the SHARED_POOL_SIZE and the LARGE_POOL_SIZE are at least 150Mb.
Please also the check the "KNOWN ISSUES" section

- Make sure the JAVA_POOL_SIZE initialization parameter is set to at least 150 MB.

- Make sure the STREAMS_POOL_SIZE is set to at least 50 MB (200 MB is ideal)

- Ensure there is a value for DB_BLOCK_SIZE

- On Windows operating systems, change the BACKGROUND_DUMP_DEST and USER_DUMP_DEST initialization parameters that point to RDBMS80 or any other environment variable
to point to the following directories instead:

BACKGROUND_DUMP_DEST to ORACLE_BASE\oradata\DB_NAME
and
USER_DUMP_DEST to ORACLE_BASE\oradata\DB_NAME\archive

- Comment out any existing AQ_TM_PROCESSES and JOB_QUEUE_PROCESSES parameter settings, and add new lines in the init.ora/spfile.ora that explicitly set AQ_TM_PROCESSES=0 and JOB_QUEUE_PROCESSES=0 for the duration of the upgrade. The "startup upgrade" command (see step 30) should ensure that these settings are used, but it's worth making sure.

- If you have defined an UNDO tablespace, set the parameter UNDO_MANAGEMENT=AUTO (otherwise, either unset the parameter or explicitly set it to MANUAL). See Note:135090.1 for further information about the Automatic Undo Management feature.

- Make sure all path names in the parameter file are fully specified. You should not have relative path names in the parameter file.

- If you are using a cluster database, set the parameter CLUSTER_DATABASE=FALSE during the upgrade.

- If you are upgrading a cluster database, then modify the initdb_name.ora file in the same way that you modified the parameter file.

- Verify the parameter FIXED_DATE is not set. If it set during the upgrade catalog and catproc will report as invalid even if there are no invalid sys or system objects. See Note: 745183.1 for further information.

回复 支持 反对

使用道具 举报

24#
 楼主| 发表于 2013-1-3 14:26:08 | 只看该作者

第二十二步:确保归档日志空间足够

Step 22 :

Check for adequate freespace on archive log destination file systems.

 

升级的过程中,会产生大量的日志,如果开启了归档,一定要检查归档的空间是否充分,否则,升级可能挂起.

回复 支持 反对

使用道具 举报

25#
 楼主| 发表于 2013-1-3 14:27:18 | 只看该作者

第二十三步:设置nls_lang环境变量

Step 23 :

If needed in your environment, ensure the environment variable NLS_LANG variable is set correctly:
To verify the current setting:
$ env | grep $NLS_LANG

For additional information on NLS_LANG settings, please refer to the following notes:


Note 158577.1 NLS_LANG Explained (How does Client-Server Character Conversion Work?)
Note 179133.1 The correct NLS_LANG in a Windows Environment
Note 264157.1 The correct NLS_LANG setting in Unix Environments


回复 支持 反对

使用道具 举报

26#
 楼主| 发表于 2013-1-3 14:28:57 | 只看该作者

第二十四步:拷贝网络服务配置文件到新的位置

Step 24:

If needed copy the SQL*Net files like (listener.ora,tnsnames.ora etc) to the new location (when no TNS_ADMIN env. Parameter is used).

$ cp $OLD_ORACLE_HOME/network/admin/*.ora /network/admin
回复 支持 反对

使用道具 举报

27#
 楼主| 发表于 2013-1-3 14:31:21 | 只看该作者

第二十五步:更新windows下的oracle服务信息

Step 25:

If your Operating system is Windows (NT, 2000, XP or 2003) delete your services with the ORADIM of your old oracle version.

Stop the OracleServiceSID Oracle service of the database you are upgrading, where SID is the instance name. For example, if your SID is ORCL, then enter the following at a command prompt:

C:\> NET STOP OracleServiceORCL

For Oracle 8.0 this is:
C:\ORADIM80 -DELETE -SID

For Oracle 8i or higher this is:
C:\ORADIM -DELETE -SID

Also create the new Oracle Database 10gR2 service at a command prompt using the ORADIM command of the new Oracle Database release:

C:\> ORADIM -NEW -SID SID -INTPWD PASSWORD -MAXUSERS USERS
-STARTMODE AUTO -PFILE ORACLE_HOME\DATABASE\INITSID.ORA
回复 支持 反对

使用道具 举报

28#
 楼主| 发表于 2013-1-3 14:34:36 | 只看该作者

第二十六 拷贝旧系统的配置文件到新目录

Step 26:

Copy configuration files from the ORACLE_HOME of the database being upgraded to the new Oracle Database 10gR2 ORACLE_HOME:

If your parameter file resides within the old environment's ORACLE_HOME, then copy it to the new ORACLE_HOME. By default, Oracle looks for the parameter file in ORACLE_HOME/dbs on UNIX platforms and in ORACLE_HOME\database on Windows operating systems. The parameter file can reside anywhere you wish, but it should not reside in the old environment's ORACLE_HOME after you upgrade to Oracle Database 10g.

If your parameter file is a text-based initialization parameter file with either an IFILE (include file) or a SPFILE (server parameter file) entry, and the file specified in the IFILE or SPFILE entry resides within the old environment's ORACLE_HOME, then copy the file specified by the IFILE or SPFILE entry to the new ORACLE_HOME. The file specified in the IFILE or SPFILE entry contains additional initialization parameters.

If you have a password file that resides within the old environments ORACLE_HOME, then move or copy the password file to the new Oracle Database 10gR2 ORACLE_HOME.

The name and location of the password file are operating system-specific.
On UNIX platforms, the default password file is ORACLE_HOME/dbs/orapwsid.
On Windows operating systems, the default password file is
ORACLE_HOME\database\pwdsid.ora. In both cases, sid is your Oracle instance ID.

If you are upgrading a cluster database and your initdb_name.ora file resides within the old environment's ORACLE_HOME, then move or copy the initdb_name.ora file to the new ORACLE_HOME.

Note:
If you are upgrading a cluster database, then perform this step on all nodes
in which this cluster database has instances configured.

Step 27:

Update the oratab entry, to set the new ORACLE_HOME and disable automatic startup:

SID:ORACLE_HOME:N
回复 支持 反对

使用道具 举报

29#
 楼主| 发表于 2013-1-3 14:36:29 | 只看该作者

第28,29 更新环境变量

Step 28:

Update the environment variables like ORACLE_HOME and PATH

$. oraenv

Step 29:


Make sure the following environment variables point to the new release (10gR2) directories:

- ORACLE_HOME
- PATH
- ORA_NLS10
- ORACLE_BASE
- LD_LIBRARY_PATH
- LD_LIBRARY_PATH_64 (Solaris only)
- LIBPATH (AIX only)
- SHLIB_PATH (HPUX only)
- ORACLE_PATH

$ env | grep ORACLE_HOME
$ env | grep PATH
$ env | grep ORA_NLS10
$ env | grep ORACLE_BASE
$ env | grep LD_LIBRARY_PATH
$ env | grep ORACLE_PATH

AIX:
$ env | grep LIBPATH

HP-UX:
$ env | grep SHLIB_PATH

Note that the ORA_NLS10 environment variable replaces the ORA_NLS33 environment variable, so you should unset ORA_NLS33 and set ORA_NLS10.

As per Note:77442.1, you should set ORA_NLS10 to point to $ORACLE_HOME/nls/data.

回复 支持 反对

使用道具 举报

30#
 楼主| 发表于 2013-1-3 14:37:23 | 只看该作者

第三十步:启动数据库到upgrade状态

Step 30:

Startup upgrade the database:
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus / as sysdba
Use Startup with the UPGRADE option:
SQL> startup upgrade
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-5-17 18:13 , Processed in 0.095348 second(s), 18 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表