ADG打补丁

1 产品DG备库安装 16494615 补丁

 

主库停止向备库传输日志

alter system set log_archive_dest_state_2=defer;

alter system set log_archive_dest_state_4=defer;

alter system set log_archive_dest_state_7=defer;

 

备库

lsnrctl stop

sqlplus '/as sysdba'

Alter database recover managed standby database cancel;

shutdown immediate

 

cd <PATCH_TOP_DIR>/16494615

opatch apply -local

 

sqlplus '/as sysdba'

startup

Alter database recover managed standby database using current logfile disconnect from session;

lsnrctl start

 

主库

alter system set log_archive_dest_state_2=enable;

alter system set log_archive_dest_state_4=enable;

alter system set log_archive_dest_state_7=enable;

 

 

2 DZD修改隐含参数,数据库重启

 

编辑 pfile0620.ora 文件

*._b_tree_bitmap_plans=FALSE

*._log_committime_block_cleanout=TRUE

*._memory_imm_mode_without_autosga=FALSE

*._optim_peek_user_binds=FALSE

*._optimizer_adaptive_cursor_sharing=FALSE

*._optimizer_extended_cursor_sharing_rel='NONE'

*._optimizer_extended_cursor_sharing='NONE'

...

 

停止监听

lsnrctl stop

 

sqlplus '/as sysdba'

shutdown immediate

startup pfile='/home/oracle/pfile0620.ora'

create spfile='/u01/app/product/11.2.0.3/db_1/dbs/spfiledzditem1.ora' from pfile='/home/oracle/pfile0620.ora';

 

lsnrctl start

 

3 DZD备库升级补丁

升级PSU 6补丁

安装  17018214 补丁

安装  16494615 补丁

 

主库停止向备库传输日志

alter system set log_archive_dest_state_2=defer;

alter system set log_archive_dest_state_3=defer;

 

备库

lsnrctl stop

sqlplus '/as sysdba'

Alter database recover managed standby database cancel;

shutdown immediate

 

=====升级 PSU6

 

unzip p16056266_112030_Linux-x86-64.zip

cd 16056266

opatch prereq CheckConflictAgainstOHWithDetail -ph ./

opatch apply -local

 

opatch lspatches

 

=====安装 17018214 补丁

unzip p17018214_112036_Linux-x86-64.zip

cd 17018214/

opatch prereq CheckConflictAgainstOHWithDetail -ph ./

opatch apply -local

 

opatch lspatches

 

=====安装 16494615 补丁

unzip p16494615_112036_Linux-x86-64.zip

cd 16494615/

opatch prereq CheckConflictAgainstOHWithDetail -ph ./

opatch apply -local

 

 

sqlplus '/as sysdba'

startup

Alter database recover managed standby database using current logfile disconnect from session;

 

启动监听器

lsnrctl start

 

 

启动主库向备库的归档日志传输

alter system set log_archive_dest_state_2=enable;

alter system set log_archive_dest_state_3=enable;

 

4 产品备库,USER备库 的Statspack 监控

user库和产品主库需要执行 spcreate.sql 创建 statperf 用户

 

sqlplus '/as sysdba'

@$ORACLE_HOME/rdbms/admin/spcreate.sql

 

6 产品库碎片整理

 

OWNER                          TABLE_NAME                     ACTUAL_BLOCK ALLOC_BLOCK     PERCEN

------------------------------ ------------------------------ ------------ ----------- ----------

PROD_DATA2                     SECTION                          474.036865       13312  .96439026

PROD_DATA2                     PE_TAGS_DEFAULT_PRODUCT          8033.35639       99968 .919640721

PROD_DATA2                     CMS_EXT_PIC_HOT_ZONE             4016.42185       20480 .803885652

PROD_DATA2                     CMS_STYLE                        16071.1502       72832 .779339436

PROD_DATA2                     CMS_MOULD                        2463.38257       10240 .759435296

PROD_DATA2                     DELIVERY_STORE                   51366.3835      184576 .721706054

PROD_DATA2                     INSHOP_MER_ACC_TRAN              17371.1532       38272 .546113264

PROD_DATA2                     TRIAL_ASSIGN_BI_JOB_RESULT       407306.605      674944 .396532742

PROD_DATA2                     CMS_DATA                         49455.8613       81792 .395345984

PROD_DATA2                     INSHOP_POSTAGE_RANGE             9940.82845       16384 .393259982

 

====表中含有大字段可以暂不做

alter table PROD_DATA2.SECTION      move;

alter index  prod_data2.PK_SECTION_ID rebuild online;

alter index  prod_data2.'SYS_IL0000022842C00004$$' rebuild online;

 

alter table PROD_DATA2.PE_TAGS_DEFAULT_PRODUCT        move;

alter index  prod_data2.PK_PE_TAGS_DEFAULT_PRODUCT rebuild online;

 

alter table PROD_DATA2.CMS_EXT_PIC_HOT_ZONE           move;

alter index  prod_data2.IDX_CMS_EPHZ_CMS_SID rebuild online;

alter index  prod_data2.PK_CMS_EXT_HOT_ID rebuild online;

 

====表中含有大字段可以暂不做

alter table PROD_DATA2.CMS_STYLE                      move;

alter index  prod_data2.PK_CMS_STYLE_ID rebuild online;

alter index  prod_data2.'SYS_IL0000022907C00002$$' rebuild online;

alter index  prod_data2.'SYS_IL0000022907C00010$$' rebuild online;

 

alter table PROD_DATA2.CMS_MOULD                      move;

alter index  prod_data2.PK_CMS_MOULD_ID rebuild online;

alter index  prod_data2.IDX_CMS_MOULD_NAME rebuild online;

 

alter table PROD_DATA2.DELIVERY_STORE                 move;

alter index  prod_data2.SYS_C0012253 rebuild online;

alter index  prod_data2.IDX_QUERY_COND rebuild online;

alter index  prod_data2.IDX_REGION_INDEX rebuild online;

alter index  prod_data2.IDX_SOURCE_PROVINCE rebuild online;

 

alter table PROD_DATA2.INSHOP_MER_ACC_TRAN            move;

alter index  prod_data2.PK_INSHOP_MER_ACC_TRAN rebuild online;

 

alter table PROD_DATA2.TRIAL_ASSIGN_BI_JOB_RESULT     move;

alter index  prod_data2.INDX_TABJR_JOBID_ENDUSERID rebuild online;

 

====表中含有大字段可以暂不做

alter table PROD_DATA2.CMS_DATA      move;

alter index  prod_data2.IDX_CMS_DATA_PRODUCT_ID rebuild online;

alter index  prod_data2.IDX_CMS_DATA_CMS_MOULD_ID rebuild online;

alter index  prod_data2.PK_CMS_DATA_ID rebuild online;

alter index  prod_data2.'SYS_IL0000022799C00021$$' rebuild online;

 

alter table PROD_DATA2.INSHOP_POSTAGE_RANGE           move;

alter index  prod_data2.INSHOP_POSTAGE_RANGE_PKEY rebuild online;

alter index  prod_data2.IDX_INSHOP_POSTAGE_RANGE_IDMI rebuild online;

你可能感兴趣的:(ADG打补丁)