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

 找回密码
 注册

QQ登录

只需一步,快速开始

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

手工升级到oracle 10gR2 的步骤

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

第九步:检查数据字典的健康情况

Step 9:

Check for corruption in the dictionary useing the following commands in SQL*Plus connected as sys:

Set verify off
Set space 0
Set line 120
Set heading off
Set feedback off
Set pages 1000
Spool analyze.sql

Select 'Analyze cluster "'||cluster_name||'" validate structure cascade;'
from dba_clusters
where owner='SYS'
union
Select 'Analyze table "'||table_name||'" validate structure cascade;'
from dba_tables
where owner='SYS' and partiti and (iot_type='IOT' or iot_type is NULL)
union
Select 'Analyze table "'||table_name||'" validate structure cascade into invalid_rows;'
from dba_tables
where owner='SYS' and partiti;

spool off


This creates a script called analyze.sql.
Now execute the following steps.

$ sqlplus '/as sysdba'
SQL> @$ORACLE_HOME/rdbms/admin/utlvalid.sql
SQL> @analyze.sql

This script (analyze.sql) should not return any errors.
回复 支持 反对

使用道具 举报

12#
 楼主| 发表于 2013-1-3 13:36:58 | 只看该作者

第十步:确保物化视图成功运行

Step 10:

Ensure that all Materialized views/Snapshot refreshes are successfully completed, and that replication must be stopped (ie: quiesced).
$ sqlplus '/ as sysdba'
SQL> select distinct(trunc(last_refresh)) from dba_snapshot_refresh_times;

You can also use:

SQL> select distinct owner, name mview, master_owner master_owner, last_refresh from dba_mview_refresh_times;

回复 支持 反对

使用道具 举报

13#
 楼主| 发表于 2013-1-3 13:40:38 | 只看该作者

第十一步:停监听并检查无介质恢复文件

Step 11:

Stop the listener for the database:

$ lsnrctl
LSNRCTL> stop

Ensure no files need media recovery:

$ sqlplus '/ as sysdba'
SQL> select * from v$recover_file;

This should return no rows.

回复 支持 反对

使用道具 举报

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

第十二步:确保目前没有文件处于备份模式

Step 12:

Ensure no files are in backup mode:

SQL> select * from v$backup where status!='NOT ACTIVE';

This should return no rows.
回复 支持 反对

使用道具 举报

15#
 楼主| 发表于 2013-1-3 13:44:08 | 只看该作者

第十三步:解决分布式事务

Step 13:

Resolve any outstanding unresolved distributed transactions:
SQL> select * from dba_2pc_pending;

If this returns rows you should do the following:

SQL> select local_tran_id from dba_2pc_pending;
SQL> execute dbms_transaction.purge_lost_db_entry('');
SQL> commit;

回复 支持 反对

使用道具 举报

16#
 楼主| 发表于 2013-1-3 13:45:12 | 只看该作者

第十四步:停止所有批处理作业

Step 14:

Disable all batch and cron jobs.
回复 支持 反对

使用道具 举报

17#
 楼主| 发表于 2013-1-3 13:46:08 | 只看该作者

第十五步:确保sys,system用户的默认表空间为system

Step 15:

Ensure the users SYS and SYSTEM have 'SYSTEM' as their default tablespace.

SQL> select username, default_tablespace from dba_users
where username in ('SYS','SYSTEM');

To modify use:

SQL> alter user sys default tablespace SYSTEM;
SQL> alter user system default tablespace SYSTEM;

回复 支持 反对

使用道具 举报

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

第十六步:在审计开启时,确保aud$在system表空间

Step 16:

Ensure that the aud$ is in the system tablespace when auditing is enabled.

SQL> select tablespace_name from dba_tables where table_name='AUD$';

 

If the AUD$ table exists, and is in use, upgrade performance can be effected depending on the number of records in the table.

Please refer to the following note for information on exporting and truncating the AUD$ table:


 

Note.979942.1 Ext/Pub Database upgrade appears to have halted at SYS.AUD$ Table
回复 支持 反对

使用道具 举报

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

第十七步:记下控制文件的位置

Step 17:

Note down where all control files are located.

SQL> select * from v$controlfile;
回复 支持 反对

使用道具 举报

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

第十八步:删除XDB.MIGR9202STATUS

Step 18:

If table XDB.MIGR9202STATUS exists in the database, drop it before upgrading the database (to avoid the issue described in Note:356082.1)
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-17 19:26 , Processed in 0.360461 second(s), 18 queries .

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

© 2001-2020

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