Saturday, December 17, 2022

ARCH Process Not Working - Killing Archive Process

 If standby database is not in sync with the primary database, there could be several reasons for this. After you have identified the reason and resolved it, log shipping still may not be functional form the primary to the standby. As a last resort, you may want to kill the currently running archive processes on the standby database so that ARC processes are spawned again and could connect to the standby database. In the following I would explain how to kill the ARC process on Unix based as well as Windows based systems.

LOG_ARCHIVE_MAX_PROCESSES

To kill on Windows based systems, you may just set LOG_ARCHIVE_MAX_PROCESSES to1.

SQL> SHOW PARAMETER log_archive_max_processes
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_max_processes            integer     4
 
SQL> select program from v$session where upper(program) like '%ARC%';
 
PROGRAM
----------------------------------------------------------------
ORACLE.EXE (ARC2)
ORACLE.EXE (ARC3)
ORACLE.EXE (ARC0)
ORACLE.EXE (ARC1)
 
SQL> alter system set log_archive_max_processes=1;
 
System altered.
 
-- Wait for some time to have all archived processes stopped except 1
 
SQL> select program from v$session where upper(program) like '%ARC%';
 
PROGRAM
----------------------------------------------------------------
ORACLE.EXE (ARC0)

After some time, you may set log_archive_max_processes back to its original value.

SQL> alter system set log_archive_max_processes=4;

For Linux based systems, above method would work perfectly fine, but it is even easier to kill ARC processes at OS level using kill command. This killing of archive process would not affect the database functionality as Oracle would automatically spawn the new ARC processes as per setting of parameter log_archive_max_processes.

[root]# ps –ef | grep arc

oracle     32714     1          0  
  Mar21   ?          01:58:34 ora_arc0_MYDB  
oracle     32718     1          0     Mar21   ?          01:58:39 ora_arc1_MYDB
oracle     32729     1          0     Mar21   ?          01:59:26 ora_arc2_MYDB
oracle     32757     1          0     Mar21   ?          01:59:40 ora_arc3_MYDB
oracle     76798     2352    0     23:02    pst/10   00:00:00 grep arc

kill -9

Use “kill” command on Unix based systems to kill the arc processes. You can kill them all onne by one and after some time you can see ARC processes automatically re-spawned.

[root]# kill -9 32714
[root]# kill -9 32718
[root]# kill -9 32729
[root]# kill -9 32757
 
-- After some time

[root]# ps –ef | grep arc
oracle     83714     1          0     23:09   ?          00:00:00 ora_arc0_MYDB  
oracle     83718     1          0     23:09   ?          00:00:00 ora_arc1_MYDB
oracle     83729     1          0     23:09   ?          00:00:00 ora_arc2_MYDB
oracle     83757     1          0     23:09   ?          00:00:00 ora_arc3_MYDB
oracle     93798     2352    0     23:10    pst/10   00:00:00 grep arc

No comments:

Post a Comment

Popular Posts - All Times