Monday, 29 March 2021

OPW-00010: Could not create the password file. This resource has a Password File.

Password file creation filed with below error

$ orapwd file='+DATAC1/DEVDB_OCI/PASSWORD/orapwdevdb' dbuniquename='DEVDB_oci'

Enter password for SYS:

OPW-00010: Could not create the password file. This resource has a Password File.


Looks password file details added to srvctl , check srvctl config


$  srvctl config database -d DEVDB_oci

Database unique name: DEVDB_oci

Database name: DEVDB

Oracle home: /u02/app/oracle/product/19.0.0.0/dbhome_2

Oracle user: oracle

Spfile: +DATAC1/DEVDB_OCI/PARAMETERFILE/spfile.339.1079736451

Password file: /u02/app/oracle/product/19.0.0.0/dbhome_2/dbs/orapwdevdb11

Domain: db.devdb.com

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools:

Disk Groups: DATAC1,RECOC1

Mount point paths: /acfs01

Services: DEVDB_obi,DEVDB_xa

Type: RAC

Start concurrency:

Stop concurrency:

OSDBA group: dba

OSOPER group: racoper

Database instances: DEVDB11,DEVDB12

Configured nodes: racnode01,racnode02

CSS critical: no

CPU count: 0

Memory target: 0

Maximum memory: 0

Default network number for database services:

Database is administrator managed


Remove pwfile details from srvctl config:

$ srvctl modify database -d DEVDB_oci -pwfile


Check srvctl config:

$  srvctl config database -d DEVDB_oci

Database unique name: DEVDB_oci

Database name: DEVDB

Oracle home: /u02/app/oracle/product/19.0.0.0/dbhome_2

Oracle user: oracle

Spfile: +DATAC1/DEVDB_OCI/PARAMETERFILE/spfile.339.1079736451

Password file:

Domain: db.devdb.com

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools:

Disk Groups: DATAC1,RECOC1

Mount point paths: /acfs01

Services: DEVDB_obi,DEVDB_xa

Type: RAC

Start concurrency:

Stop concurrency:

OSDBA group: dba

OSOPER group: racoper

Database instances: DEVDB11,DEVDB12

Configured nodes: racnode01,racnode02

CSS critical: no

CPU count: 0

Memory target: 0

Maximum memory: 0

Default network number for database services:

Database is administrator managed


Lets try adding password file:

$ orapwd file='+DATAC1/DEVDB_OCI/PASSWORD/orapwdevdb' dbuniquename='DEVDB_oci'

Enter password for SYS:


Add pwfile to srvctl config again:

$ srvctl modify database -d DEVDB_oci -pwfile  '+DATAC1/DEVDB_OCI/PASSWORD/orapwdevdb'


$ srvctl config database -d DEVDB_oci

Database unique name: DEVDB_oci

Database name: DEVDB

Oracle home: /u02/app/oracle/product/19.0.0.0/dbhome_2

Oracle user: oracle

Spfile: +DATAC1/DEVDB_OCI/PARAMETERFILE/spfile.339.1079736451

Password file: +DATAC1/DEVDB_OCI/PASSWORD/orapwdevdb

Domain: db.devdb.com

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools:

Disk Groups: DATAC1,RECOC1

Mount point paths: /acfs01

Services: DEVDB_obi,DEVDB_xa

Type: RAC

Start concurrency:

Stop concurrency:

OSDBA group: dba

OSOPER group: racoper

Database instances: DEVDB11,DEVDB12

Configured nodes: racnode01,racnode02

CSS critical: no

CPU count: 0

Memory target: 0

Maximum memory: 0

Default network number for database services:

Database is administrator managed




Oracle RAC GC (Global Cache) waits

Oracle RAC GC (Global Cache) waits occur when multiple instances in a Real Application Clusters (RAC) environment contend for access to a shared cache. These waits can impact performance and scalability. Let's discuss common findings related to RAC GC waits and some potential solutions, including relevant commands.
 
Identify top wait events related to GC Buffer Busy waits:

SELECT event, total_waits, time_waited
FROM gv$system_event
WHERE event LIKE 'gc buffer busy%';

Monitor the most accessed objects:

SELECT owner, object_name, object_type, buffers, gets
FROM dba_objects
ORDER BY gets DESC; 

  • Implement partitioning, caching mechanisms, or workload distribution strategies to reduce contention.

Unbalanced Global Cache Fusion:
Check the workload distribution across instances:
SELECT inst_id, count(*)
FROM gv$session
GROUP BY inst_id;

SELECT inst_id, name, network_type, bandwidth, latency FROM gv$cluster_interconnects;

  • Ensure the interconnect network is functioning properly and has sufficient bandwidth.
  • Redistribute workload across instances using connection load balancing or Oracle services.

Inadequate Buffer Cache Size:
Check buffer cache hit ratios:
SELECT name, value
FROM gv$sysstat
WHERE name IN ('db block gets', 'consistent gets', 'physical reads');

  • Adjust the buffer cache size using the DB_CACHE_SIZE initialization parameter or Automatic Shared Memory Management (ASMM) / Automatic Memory Management (AMM) features.

High Library Cache Lock:
Identify top SQL statements causing contention:

SELECT sql_text, executions, child_number
FROM gv$sql
WHERE address IN (
  SELECT address
  FROM gv$session
  WHERE event LIKE 'library cache%');

  • Optimize SQL statements using SQL plan management, indexing, query rewriting, or SQL profile hints.

Tuesday, 9 March 2021

Opatch apply failed with Missing command :fuser

Opatch apply failed with Prerequisite check "CheckSystemCommandAvailable" failed error

/usr/local/312813555> opatch apply

Oracle Interim Patch Installer version 12.2.0.1.21

Copyright (c) 2021, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/19.8.0_64

Central Inventory : /app/oraInventory

   from           : /u01/app/oracle/product/19.8.0_64/oraInst.loc

OPatch version    : 12.2.0.1.21

OUI version       : 12.2.0.7.0

Log file location : /u01/app/oracle/product/19.8.0_64/cfgtoollogs/opatch/opatch2021-01-01_07-48-00AM_1.log

Verifying environment and performing prerequisite checks...

Prerequisite check "CheckSystemCommandAvailable" failed.

The details are:

Missing command :fuser

UtilSession failed: 

Prerequisite check "CheckSystemCommandAvailable" failed.

Log file location: /u01/app/oracle/product/19.8.0_64/cfgtoollogs/opatch/opatch2021-01-01_07-48-00AM_1.log

OPatch failed with error code 73

Opatch log:                                 

[Feb 1, 2021 7:48:10 AM] [INFO]     Execution of 'sh /usr/local/31281355/custom/scripts/init -apply 31281355 ':

[Feb 1, 2021 7:48:10 AM] [INFO]     Return Code = 0

[Feb 1, 2021 7:48:10 AM] [INFO]     Execution of ' Command and arguments of init script is restricted to be viewed in log file ':    Return Code = 0

[Feb 1, 2021 7:48:10 AM] [INFO]     Running prerequisite checks...

[Feb 1, 2021 7:48:13 AM] [INFO]     Space Needed : 5612.323MB

[Feb 1, 2021 7:48:13 AM] [INFO]     Missing command :fuser

[Feb 1, 2021 7:48:13 AM] [INFO]     Prerequisite check "CheckSystemCommandAvailable" failed.

                                    The details are:

                                    Missing command :fuser

[Feb 1, 2021 7:48:13 AM] [SEVERE]   OUI-67073:UtilSession failed: 

                                    Prerequisite check "CheckSystemCommandAvailable" failed.

[Feb 1, 2021 7:48:13 AM] [INFO]     Finishing UtilSession at Mon Mar 01 07:48:13 GMT 2021

[Feb 1, 2021 7:48:13 AM] [INFO]     Log file location: /u01/app/oracle/product/19.8.0_64/cfgtoollogs/opatch/opatch2021-01-01_07-48-00AM_1.log

[Feb 1, 2021 7:48:13 AM] [INFO]     Stack Description: java.lang.RuntimeException: 

                                    Prerequisite check "CheckSystemCommandAvailable" failed.

Solution:                                 

/home/oracle> cd $ORACLE_HOME/bin

[oracle@dbrestore-test] -->poc19c1<--

/u01/app/oracle/product/19.8.0_64/bin> touch fuser

[oracle@dbrestore-test] -->poc19c1<--

/u01/app/oracle/product/19.8.0_64/bin> chmod 755 fuser

[oracle@dbrestore-test] -->poc19c1<--

/u01/app/oracle/product/19.8.0_64/bin> ls -ltr fuser

-rwxr-xr-x. 1 oracle oinstall 0 Mar  1 07:50 fuser