Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Wednesday, June 8, 2022

How to rollback the patch after failed cutover phase in R12.2:

There may be scenario  when  cutover phase failed . It is possible to go back to previous state of cutover(rollback the patch) ,if flashback database is either enabled in the database or we have taken full backup prior to cutover:

We having Flashback enabled in the database:

SQL>select FLASHBACK_ON from v$database;

Scenario1:

You are running an Online Patching cycle:

$ adop phase=prepare

$ adop phase=apply patches=99999999

$ adop phase=finalize

$ adop phase=cutover

Cutover fails, and you need to go back to the state of the system before you ran the cutover phase.

If you had not run the cutover phase, you would have been able to roll back the patch by running the adop abort phase. However, this is not possible once cutover has been run.

Two main parts to rollback the patch:

(1) Database Restore : Here we can use either Flashback or database restore technique.

Flashing Back the Database:

First, shut down the database, then start it up in mount state:

SQL>shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>startup mount

ORACLE instance started.

Restore the flashback to the specified time.

SQL>flashback database to time to_data(<time before teh cutover>;

Start the database in read-only mode:

Shut down the database, start it up in mount state, then open it with the resetlogs option:

SQL>shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>startup mount

ORACLE instance started.

Database mounted.

SQL>alter database open resetlogs;

Database altered.

2) Filesystem restore:

check  whether cutover failed before the file systems were switched. referring to the cutover logs.

Case 1:

If  cutover failed before the file systems were switched,then clean shutdown of any services that are running. Then restart all the services using the normal startup script.

Case 2 :

If cutover failed after the file systems were switched:

Shut down services started from new run file system, in multi-node environment, repeat  on all nodes.

Switch file systems back onall nodes:

$ perl $AD_TOP/patch/115/bin/txkADOPCutOverPhaseCtrlScript.pl \

-action=ctxupdate \

-contextfile=<full path to new run context file> \

-patchcontextfile=<full path to new patch file system context file> \

-outdir=<full path to out directory>

Start up all services from the old run file system.

After the restore is complete:

For example:

$ adop phase=prepare

$ adop phase=apply patches=9999999

$ adop phase=abort

$ adop phase=cleanup cleanup_mode=full

$ adop phase=fs_clone

$ adop phase=abort,cleanup cleanup_mode=full


Refrence:

https://techgoeasy.com/rollback-patch-cutover-phase-r12-2/

No comments:

Post a Comment