/****install oracle patch 9169457 for windows****/

oo0yuki0oo發表於2010-04-23

/************************************************/
/****install oracle patch 9169457 for windows****/
/************************************************/


alter user sys account unlock;
alter user system account unlock;
alter user sys identified by XXXXXX;
alter user system identified by XXXXXX;

grant select on v_$session to svs

select * from v$instance;
select * from v$database;


alter database stop logical standby apply;

exec dbms_logstdby.apply_set('_MAX_LUBA_STACK', 4000000);

/*Clean shutdown oracle*/
sql>shutdown immediate
exit

/*make sure no other process use oracle and spora32.dll*/
services.msc
close OracleDBConsoleCenter
close OracleMTRRecoveryService
close OracleTNSListener
close ORacleServiceXXXX

tasklist /m ora*
tasklist /m spora32.dll

Back up the current database that is installed, the %ORACLE_HOME% directory
and Oracle inventory under c:Program filesoracle directory.


alter system set "_fifth_spare_parameter"=1 scope=spfile sid='*';
alter system set "_fourth_spare_parameter"="clientid_overwrite_on"
alter system set event="10411 trace name context forever, level 1" scope=spfile sid='*';

alter system set DG_BROKER_START = TRUE


SQL> alter database stop logical standby apply;
SQL> exec dbms_logstdby.apply_set('_MAX_LUBA_STACK', 4000000);

Go to %ORACLE_HOME%bin and run->regsvr32 oip10.dll to register the latest oip10.dll

/* In a Data Vault installation, please run the following*/

> cd %ORACLE_HOME%rdbmsadmin
> sqlplus /nolog

Create DV_PATCH_ADMIN role (one-time task)
SQL> CONNECT DVSYS
SQL> CREATE ROLE DV_PATCH_ADMIN;
SQL> GRANT DV_PATCH_ADMIN TO DV_OWNER WITH ADMIN OPTION;
SQL> GRANT DV_PATCH_ADMIN TO SYS;

SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> insert into dvsys.rule_set_t$ (id#, name, description,fail_message, language)
values(8, 'Allow Datapump Operation','Rule set that controls the objects that can be exported '||'or imported by the datapump user.',NULL, 'us');
SQL> @catmac.sql SYSTEM TEMP SYS_password DVSYS_password
SQL> @catols.sql
SQL> STARTUP
SQL> @catmacpatch.sql
SQL> QUIT

/**If catcpu.sql reports any Invalid Objects, compile the invalid objects as follows.
(For large numbers of objects, this compilation step can take some time.
If you are applying this patch through the Oracle Enterprise Manager console,
you will be prompted to run this compilation script.) **/

> cd %ORACLE_HOME%rdbmsadmin
> sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlprp.sql 0


/*Run the pre-check script,
which reports the maximum number of views and objects
that may be recompiled:
(check whether view recompilation has already been performed for the database,
execute the following statement.
SELECT * FROM registry$history where ID = '6452863'; )*/

cd %ORACLE_HOME%BUNDLEview_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @recompile_precheck_jan2008cpu.sql
SQL> QUIT

grant select on v_$session to svs;
grant delete,insert,update on svs_acct_sign_hist to system;
grant select on svs_acct_hist_seq to system;
grant execute on fn_concat_baseattach to system ;
grant execute on split to system ;
grant insert,update on svs_sign to system;
grant insert on svs_aud_trail to system;
grant insert on svs_pip_audit to system;
grant insert,update,delete on svs_cust_sign to system;

alter user sys account lock;
alter user system account lock;

alter user system password expire;
alter user sys password expire;

alter user sys identified by values '!NOTVALID!'
alter user system identified by values '!NOTVALID!'

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8337095/viewspace-1033120/,如需轉載,請註明出處,否則將追究法律責任。

相關文章