Thursday, January 3, 2019

Set environment variable RAT_DBNAMES to name of the database and re-run


One day i was running exachk, immediately process stoped with below message 

root@escinfra01:/export/home/oracle/exachk# ./exachk

Searching for running databases . . . . .

Databases are not registered in Clusterware to check best practices. Set environment variable RAT_DBNAMES to name of the database and re-run.
eg. like export RAT_DBNAMES="TESTDB,PRODDB"

root@escinfra01:/export/home/oracle/exachk#

Cause

I figured out that this server was holding some databases which are not registered with Cluster as result exachk is terminating and requesting for proper SID's to be set.

Solution

I set RAT_DBNAMES to one of my database which is registered with cluster and re-executed exachk and it through.

root@escinfra01:/export/home/oracle# export RAT_DBNAMES=dbm08
root@escinfra01:/export/home/oracle#
root@escinfra01:/export/home/oracle/exachk# ./exachk
.  .
.  .
Checking Status of Oracle Software Stack - Clusterware, ASM, RDBMS
.
.  .  .  . . . .  .  .  .
-------------------------------------------------------------------------------------------------------
                                                 Oracle Stack Status
-------------------------------------------------------------------------------------------------------
  Host Name       CRS Installed  RDBMS Installed    CRS UP    ASM UP  RDBMS UP    DB Instance Name
-------------------------------------------------------------------------------------------------------
 escinfra01                 Yes          Yes          Yes      Yes       No
-------------------------------------------------------------------------------------------------------

Unable to archive thread 1 sequence ###


From alert log it was noticed that archive process is leaving some messages as below.

Sun Nov 11 09:41:34 2018
ARC5: Evaluating archive log 20 thread 1 sequence 59168
ARC5: Unable to archive thread 1 sequence 59168
      Log actively being archived by another process
ARC5: Evaluating archive log 22 thread 1 sequence 59175
ARC5: Unable to archive thread 1 sequence 59175
      Log actively being archived by another process

Cause

It is due to having more than one archiver.

Solution

If automatic archiving is turned 'ON' and LOG_ARCHIVE_MAX_PROCESSES is set to more than one, then all of the archiver processes will try to archive this logfile, however they will not be able to aquire the lock 'kcrrlt', to protect multiple arch processes from archiving the same logfile.

The failing process process will write to the trace/alert message that it was unable to archive the logfile.

It doesn't mean that the log mentioned is not archived; it is successfully archived by some other process. It only means that the log was not archived the first time it was tried.


If you go a bit down you will see that the log had been archived.

Sun Nov 11 09:41:45 2018
ARC9: Completed archiving thread 1 sequence 59168 (0-0)

ORA-39083: Object type PROCACT_SYSTEM failed to create with error

Error

Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PRE_SYSTEM_ACTIONS/PROCACT_SYSTEM
>>> Cannot set an SCN larger than the current SCN. If a Streams Capture configuration was imported then the Apply that processes the captured messages needs to be dropp
ed and recreated. See My Oracle Support article number 1380295.1.
ORA-39083: Object type PROCACT_SYSTEM failed to create with error:

ORA-20000: Incompatible version of Workspace Manager Installed

Cause

Version of the Oracle Workspace Manager (OWM) in the source and target are not same.

Solution

Ignore the following errors, if IMPDP is importing all other components and data successfully:

To move the workspaces from the 11.2.0.3 or 11.2.0.4 SOURCE db, the FULL db export must be generated with the parameter "VERSION=12".

If the SOURCE database is older than 11.2.0.3, e.g. 11.2.0.2 or 11.1.0.7, the database will first need to be upgraded to 11.2.0.3 or 11.2.0.4

Sunday, November 4, 2018

ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_16656"

Error

ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_16656"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197

Cause Its an known BUG, Advisory packages were not created properly during database creation.

Solution

Verify advisory packages are exist or not, if you are getting these errors means you will not found these objects.

select name, ctime, how_created
from sys.wri$_adv_tasks
where owner_name = 'SYS'
and name in ('AUTO_STATS_ADVISOR_TASK','INDIVIDUAL_STATS_ADVISOR_TASK');

no rows selected

Create these objects using below command

SQL> EXEC dbms_stats.init_package();

PL/SQL procedure successfully completed.


Friday, October 19, 2018

Resource manager plan is not active or is not managing CPU usage


Error

SQL> EXECUTE dbms_stats.gather_table_stats(ownname=>'ROCFM',tabname=>'SUBSCRIBER',cascade=>true);
BEGIN dbms_stats.gather_table_stats(ownname=>'ROCFM',tabname=>'SUBSCRIBER',cascade=>true); END;

*
ERROR at line 1:
ORA-20000: Unable to gather statistics concurrently: Resource manager plan is not active or is not managing CPU usage
ORA-06512: at "SYS.DBMS_STATS", line 34757

ORA-06512: at line 1


Cause

Resource Manager must be enabled in 12c in order to use any value other than OFF for the CONCURRENT preference (which enables concurrent statistics gathering).

Solution

SQL> alter system set resource_manager_plan = 'DEFAULT_PLAN' ;

System altered.

SQL> EXECUTE dbms_stats.gather_table_stats(ownname=>'ROCFM',tabname=>'SUBSCRIBER',cascade=>true);


PL/SQL procedure successfully completed.


SQL>