In one of the environments (19c) after successfully applying Oracle patches at binary level, the following error was thrown when datapatch command was executed:
Error: prereq checks failed! patch XXXX: XML descriptor does not exist in either the file system or SQL registry Prereq check failed, exiting without installing any patches.
Please refer to MOS Note 1609718.1 and/or the invocation log /opt/oracle/cfgtoollogs/sqlpatch/sqlpatch_16524_2025_01_31_14_35_22/sqlpatch_invocation.log for information on how to resolve the above errors.
so the tool was searching for an old patch that doesn’t exist anymore under $ORACLE_HOME/sqlpatch directory.
— Possible Solutions:
Possible solution 1: if the patch number XXXX is related to old java patch, then apply latest OJVM patch…you can execute the following command to check: $ORACLE_HOME/OPatch/opatch lspatches
Possible solution 2: copy the missing patch folder from another database environment to this environment (the environment you are facing the error) , under this folder: $ORACLE_HOME/sqlpatch
very useful new feature in Oracle 23ai is the ability to insert multiple row values in one shot, unlike older releases where you need to repeat the SQL command multiple times for each row insertion.
To illustrate:
create table sh1.dummy (fname varchar2(20));
insert into sh1.dummy values (’emad’), (‘ricardo’), (‘john’);
By default in Linux operating systems especially (red hat, oracle linux) Transparent Huge Pages are enabled by default.
Per Oracle recommendation Transparent HugePages are known to cause unexpected node reboots and performance problems. So, its strongly recommended to disable Transparent HugePages on all Database servers running Oracle.
*** UPDATE AUGUST 2025: Oracle strategy has changed and now they are recommending to set Transparent HugePages to madvise
To check your current operating system configuration:
Now, THP is disabled after verifying this by running the above cat command and your database environment will be running in the best and recommended performance setup.
In Oracle container database architecture when you connect by default using bequeath protocol as SYSDBA you will connect against CDB$ROOT.
Is there a way to connect directly to a pluggable database as SYSDBA ?
Yes,
export ORACLE_PDB_SID=PDB3 sqlplus / as sysdba
as shown below:
In the past I used to switch to a pluggable database after accessing CDB$ROOT :
sqlplus / as sysdba
SQL> alter session set container=PDB3;
so no need for that with environment variable ORACLE_PDB_SID which will help a lot if you want to develop shell scripts to run against specific databases within the container.
There is an Oracle database parameter filesystemio_options that I found out most DBA’s are not aware of. First, this parameter can be used if your environment is NOT based on ASM setup.
In default behaviour…In buffered I/O, the Operating System maintains its own cache of disk data. Rather than directly reading to or writing from a process buffer, data is read from the disk into the cache and copied to the process buffer or copied from the process into the cache and written from there to the disk. Moreover, read requests are processed through cached data without having to read it again from the disk and can prefetch data from the disk into the cache before processes request it, speeding reads for data.
The catch here is that Oracle database system is already has in-place buffer cache for (read,write) to disk operations, so there will be “double” operations going on from DB & OS and will cause CPU performance overhead. However, direct IO will bypass the double buffering overhead.
Add the following parameter in init.ora and re-start the database instance:
filesystemio_options=setall
To observe the performance boost, generate AWR report before setting the parameter ( period of 1 week) and compare it after setting the parameter for 1 week report generation…..and the findings:
BEFORE PARAMETER SET:
AFTER PARAMETER SET:
DB CPU, db file sequential read, direct path read wait events are drastically improved as shown in BEFORE/AFTER figures.
A virtual private database (VPD) is a security feature that masks data so that only a subset of the data appears to exist, without actually segregating data into different tables, schemas or databases.
Whenever a SQL query is executed, the relevant predicates for the involved tables are transparently collected and query results are returned with “filtered” rows based on database account session context.
By Default “DBA”role is not granted EXEMPT ACCESS POLICY system privilege.
In 19c the following are granted EXEMPT ACCESS POLICY system privilege :
SQL> select * from dba_sys_privs where privilege like ‘%EXEMPT ACCESS POLICY%’;
In 23ai the following are granted EXEMPT ACCESS POLICY system privilege:
// Important Note: in 23ai you can’t define DBMS_RLS policy using sysadmin_vpd account, you can do that in 23ai using SYS account only….if you try in 23ai execute the below package an error [ORA-01031: insufficient privileges] will be thrown:
I have an already existing virtual machine with oracle linux 8 in-place, so the next step is to download the RPM package for oracle 23ai from this website:
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
Confirm the password:
dummy password used====> 23ai#2024
After that set your environment variables as follows:
DBMS_DICTIONARY_CHECK package has been back-ported from 23c to oracle 19c when applying January 2024 RU [19.22]. The package is a read-only PL/SQL package procedure that helps you identify Oracle Database dictionary. its in some sense the evolution of hcheck.sql script that you need to download and install, this is not needed anymore … this package is now available as built-in is really a positive move.
To Run the Package to examine your database state:
SQL> set serveroutput on size unlimited SQL> execute dbms_dictionary_check.full;
A detailed report will be generated as shown below:
To Check “Critical” Findings and the status:
SQL> execute dbms_dictionary_check.critical
The following are the 3 main areas that package will consider and flag “Critical”and should be in “PASS” or valid state otherwise it has negative impact and will require your attention/fix:
UndoSeg: Checks that undo segment has a valid entry in SEG$ (My Oracle Support Note 1360527.1) MaxControlfSeq: Checks if Control Seq is near the limit (My Oracle Support Note 2128446.1) InvalidTSMaxSCN: Checks for invalid SCN entries in tablespaces (My Oracle Support Note 1360208.1)
To Run a FULL Repair for the reported findings:
SQL> set serveroutput on size unlimited SQL> EXECUTE dbms_dictionary_check.full(repair=>TRUE);