ORA-26988: Cannot grant Oracle GoldenGate privileges. The procedure GRANT_ADMIN_PRIVILEGE is disabled.

Problem:

While trying to grant the privilege to Golden Gate user in 23ai database, I received the following error:

SQL> EXEC DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('GGADMIN');
BEGIN DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('GGADMIN'); END;

*
ERROR at line 1:
ORA-26988: Cannot grant Oracle GoldenGate privileges. The procedure GRANT_ADMIN_PRIVILEGE is disabled.
ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 601
ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 636
ORA-06512: at "SYS.DBMS_GOLDENGATE_AUTH", line 38
ORA-06512: at line 1
Help: https://docs.oracle.com/error-help/db/ora-26988/

Explanation:

With Oracle Database release 23ai, procedures are replaced by roles.

Solution:

Grant the following Oracle GoldenGate roles: OGG_CAPTURE for Extract, OGG_APPLY for Replicat, and OGG_APPLY_PROCREP for procedural replication with Replicat.

grant OGG_APPLY to GGADMIN;
grant OGG_APPLY_PROCREP to GGADMIN;
grant OGG_CAPTURE to GGADMIN;

ORA-27106: system pages not available to allocate memory

Oracle error ORA-27106: system pages not available to allocate memory can appear when starting up a database instance, particularly when HugePages are misconfigured or unavailable. This post walks through a real-world scenario where the error occurs, explains the underlying cause, and provides step-by-step resolution.

Problem

Attempting to start up the Oracle database instance results in the following error:

oracle@mk23ai-b:~$ sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on Thu Jul 3 00:15:46 2025
Version 23.7.0.25.01

Copyright (c) 1982, 2024, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-27106: system pages not available to allocate memory
Additional information: 6506
Additional information: 2
Additional information: 3

Cause

This error is most often seen on Linux platforms when HugePages are either:

  • Not configured,
  • Insufficiently allocated,
  • and the database is explicitly configured to use only HugePages with: use_large_pages='ONLY'

Troubleshooting

1) Identify the SPFILE path of the database

$ srvctl config database -db orclasm

Output:

Database unique name: orclasm
Database name: orclasm
Oracle home: /u01/app/oracle/product/23ai/dbhome_1
Oracle user: oracle
Spfile: +DATA/ORCLASM/PARAMETERFILE/spfile.274.1201294643
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups: DATA
Services:
OSDBA group:
OSOPER group:
Database instance: orclasm

2) Create a PFILE from the SPFILE

You can create a pfile from an spfile without starting the instance, which is particularly useful when the instance cannot be started.

$ export ORACLE_SID=orclasm
$ sqlplus / as sysdba

SQL> create pfile='/tmp/temppfile.ora' from spfile='+DATA/ORCLASM/PARAMETERFILE/spfile.274.1201294643';

File created.

SQL> exit

Now, inspect the HugePages configuration setting:

$ grep -i use_large_pages /tmp/temppfile.ora
*.use_large_pages='ONLY'

3) Check HugePages availability on the system

$ grep Huge /proc/meminfo

Example output (problem scenario):

HugePages_Total:       0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB

HugePages are not configured on the system in this case. If it is configured for you, then the HugePages_Free value is insufficient.

Solution

1) Estimate required HugePages

You can estimate the needed HugePages based on total SGA:

đť‘“: HugePages = (SGA size in MB) / Hugepagesize

For example, if SGA is 24 GB (24576 MB) and Hugepagesize = 2 MB, then required
HugePages = 24576 / 2 = 12288

2) Configure HugePages at OS level

Edit /etc/sysctl.conf:

vm.nr_hugepages = 12288

Then apply:

# sysctl -p

3) Start the database in nomount to verify it is startable

$ sqlplus / as sysdba
SQL>
startup nomount

4) Reboot and verify

Restart the system to ensure that everything is functioning properly after the reboot and double check the config:

$ grep Huge /proc/meminfo

Expected output:

HugePages_Total:    12288
HugePages_Free: 12288
Hugepagesize: 2048 kB

⚠️ Temporary Workaround (not recommended for production)

If you need to get the database up urgently and cannot configure HugePages immediately, change the parameter to:

use_large_pages='TRUE'

This allows fallback to regular memory pages. However, for best performance and to avoid fragmentation, it’s strongly recommended to configure HugePages correctly and use use_large_pages='ONLY' in production.

PRVG-11960 : Set user ID bit is not set for file oradism

Problem:

While running asmca, I have got the following error:

Cause - Following nodes does not have required file ownership/permissions: Node :mk23ai-b PRVG-11960 : Set user ID bit is not set for file "/u01/app/oracle/product/23ai/dbhome_1/bin/oradism" on node "mk23ai-b".   Action - Run the Oracle home root script as the "root" user to fix the permissions.

Troubleshoot:

Check the current permissions on the file:

oracle@mk23ai-b:~$ ll /u01/app/oracle/product/23ai/dbhome_1/bin/oradism
-rwxr-x---. 1 root oinstall 1138016 Jul 11 2024 /u01/app/oracle/product/23ai/dbhome_1/bin/oradism

Solution:

The error message includes an action section that states the steps to follow. Connect to the database server as the root user and execute the root.sh script from the RDBMS home directory, since oradism mentioned in the error is located there.

root@mk23ai-b:~# /u01/app/oracle/product/23ai/dbhome_1/root.sh
Performing root user operation.

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/23ai/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

Check the file permissions again:

oracle@mk23ai-b:~$ ll /u01/app/oracle/product/23ai/dbhome_1/bin/oradism
-rwsr-x---. 1 root oinstall 1138016 Jul 11 2024 /u01/app/oracle/product/23ai/dbhome_1/bin/oradism

This time it has user ID bit is set.

Normally, when you run a program (an executable file), it runs with your own permissions – meaning it can only do what your user account is allowed to do. But if the setuid bit is set on a file, the program runs with the permissions of the file’s owner, regardless of who is running it.

You can continue using ASMCA this time.

CLSRSC-400: A system reboot is required to continue installing during root.sh

Problem:

While running the root.sh script, I encountered the following error:

root@mk23ai-b:~# /u01/app/23ai/grid/root.sh
Performing root user operation.
...
/u01/app/oracle/crsdata/mk23ai-b/crsconfig/roothas_2025-05-16_07-10-12PM.log
2025/05/16 19:10:17 CLSRSC-400: A system reboot is required to continue installing.
Died at /u01/app/23ai/grid/crs/install/oraafd.pm line 688.

If you think rebooting the system and rerunning the root.sh script will help, well, no… I’ve already tried :).

Troubleshoot:

Check if the secure boot is enabled:

root@mk23ai-b:~# mokutil --sb-state
SecureBoot enabled

Based on the previous output, Secure Boot is enabled. If you received a different output, such as “Secure Boot disabled,” continue your search.

Solution:

To disable Secure Boot, you cannot do it from the terminal; you need to access your computer’s firmware settings (BIOS or UEFI) and disable the Secure Boot option there.

In my case, I am using an Azure VM, and I can show you how I disabled it using the Azure console.

Note: This action requires VM downtime.

VM -> Configuration -> Security type section -> uncheck “Enable secure boot” -> Apply

Connect to the VM and rerun root.sh script:

root@mk23ai-b:~# /u01/app/23ai/grid/root.sh
...

mk23ai-b 2025/05/16 19:32:48 /u01/app/oracle/crsdata/mk23ai-b/olr/backup_20250516_193248.olr 0
2025/05/16 19:32:50 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

Oracle 23ai: ORA-40490 COLUMNS clause required

Problem:

While working with Oracle’s native JSON data type, I ran into a bit of a hiccup while trying to insert JSON data into a table:

SQL> insert into json_table(data) 
values(
json_object(
'name' value 'Mari',
'age' value 34,
'city' value 'Tbilisi'));

I get the following error:

ERROR at line 1:
ORA-40490: COLUMNS clause required

And similarly, for creating a JSON Search Index (this is the syntax that is provided by Oracle documentation by now)

CREATE SEARCH INDEX mk_search_idx ON json_table(data) FOR JSON;

It returns the same error:

ERROR at line 1:
ORA-40490: COLUMNS clause required

At this point, I figured the issue had to be about the “COLUMNS clause”, which the error clearly mentions – but where exactly is it supposed to go?

Solution:

Turns out, Oracle wants you to explicitly declare the COLUMNS clause right after the table name. Here’s the syntax that finally worked for me:

SQL> insert into json_table columns(data)
values(
json_object(
'name' value 'Salome',
'age' value 12,
'city' value 'Tbilisi'));
1 row created.

SQL> commit;

And similarly, for creating a JSON Search Index:

SQL> CREATE SEARCH INDEX mk_search_idx ON json_table columns(data) FOR JSON;

Index created.

Release Schedule of Current Database Releases

Determining the schedule for a new database release can be challenging. Online, you may encounter misleading information suggesting that the database has already launched when it is still not generally available (GA). To ensure you have accurate details, refer to the following metalink article.

Release Schedule of Current Database Releases (Doc ID 742060.1)

Also, verify the document’s update date found on the right side under Document Details -> Last Major Update -> Last Update.

OPatchauto fails: CLSRSC-180: An error occurred while executing the command ‘/bin/rpm -qf /sbin/init’

Problem:

During applying ACFS patch on top of GI home, I received the following error:

Command failure output:
...
2024/03/08 19:31:03 CLSRSC-180: An error occurred while executing the command '/bin/rpm -qf /sbin/init'

After fixing the cause of failure Run opatchauto resume

]
OPATCHAUTO-68061: The orchestration engine failed.
OPATCHAUTO-68061: The orchestration engine failed with return code 1
OPATCHAUTO-68061: Check the log for more details.
OPatchAuto failed.

OPatchauto session completed at Fri Mar 8 19:31:04 2024
Time taken to complete the session 3 minutes, 38 seconds

opatchauto failed with error code 42

Troubleshooting:

I attempted to manually execute the command that failed, and it returned a helpful error message:

[root@rac1 tmp]# /bin/rpm -qf /sbin/init
error: rpmdb: BDB0113 Thread/process 5003/139974823143296 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
...

Solution:

I have a solution for this type of error in another post. Let’s solve it again:

[root@rac1 tmp]# rpm  --rebuilddb

Rerun the failing command to make sure it was resolved:

[root@rac1 tmp]# /bin/rpm -qf /sbin/init
systemd-239-78.0.3.el8.x86_64

If you encountered an error during patching, you can resume opatchauto at this point:

[root@rac1 tmp]# /u01/app/19.3.0/grid/OPatch/opatchauto resume

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:rac1
CRS Home:/u01/app/19.3.0/grid
Version:19.0.0.0.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /tmp/36114443/36114443
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-03-08_19-29-48PM_1.log

Good luck, as always!

Rename directories, subdirectories, files recursively that contain matching string

Problem:

I have copied /u01 directory (containing Oracle software) from another node. The Oracle software home includes directories and files with hostnames.

My task was to rename all directories, subdirectories, and files containing the specific hostname (in my case rac2) into rac1.

Let me show you the folder hierarchy that is challenging when you want to rename by script. For simplicity, this hierarchy is made up, but this type of dependency exists in /u01:

/u01/first_level_rac2/second_level_rac2/third_level_rac2.txt

We want to have:

/u01/first_level_rac1/second_level_rac1/third_level_rac1.txt

So finally, all folders or files containing the string rac2 should be replaced with rac1.

The challenge here is that you need to start renaming from the third_level, then rename second_level and later first_level. Otherwise, you will have accessibility issues with other subdirectories or files.

Solution:

If you want a shortcut, here is the code:

[root@rac1 ~]# find /u01 -depth -name "*rac2*" | while read i ; do
newname="$(echo ${i} |sed 's/\(.*\)rac2/\1rac1/')" ;
echo "mv" "${i}" "${newname}" >> rename_rac2_rac1.sh;
done

Later you need to run rename_rac2_rac1.sh file, which will contain mv statements for each matching file or folder.

Let me explain,

find /u01 -depth -name "*rac2*" – This will find all files and folders that contain rac2 keyword and will display the output with depth-first order.

Without depth, the output is the following:

/u01/first_level_rac2
/u01/first_level_rac2/second_level_rac2
/u01/first_level_rac2/second_level_rac2/third_level_rac2.txt

With -depth, you will see the next order:

/u01/first_level_rac2/second_level_rac2/third_level_rac2.txt
/u01/first_level_rac2/second_level_rac2
/u01/first_level_rac2

"$(echo ${i} |sed 's/\(.*\)rac2/\1rac1/')" – In this line, the value of i iterator (each line from find command) will be redirected to sed command that will replace the first occurrence of rac2 keyword searching from backward.

Later old name and a new name will be concatenated with mv statement and saved into rename_rac2_rac1.sh

This will be mv statements generated by the script:

mv /u01/first_level_rac2/second_level_rac2/third_level_rac2.txt /u01/first_level_rac2/second_level_rac2/third_level_rac1.txt

mv /u01/first_level_rac2/second_level_rac2 /u01/first_level_rac2/second_level_rac1

mv /u01/first_level_rac2 /u01/first_level_rac1

Move Oracle controlfile from filesystem to ASM

1. Find out controlfile locations:

Please note another copy of controlfile is already on ASM, +FRA diskgroup. We are moving the first one.

SQL> show parameter control_files

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
control_files			     string	 /u01/app/oracle/oradata/PRSH01
						 /control01.ctl, +FRA/PRSH01/co
						 ntrol02.ctl

2. Place database into nomount mode using RMAN and copy controlfile to new location:

$ rman target /

RMAN> startup nomount;
RMAN> restore controlfile to '+DATA' from '/u01/app/oracle/oradata/PRSH01/control01.ctl';

3. Note the name assigned to the controlfile:

[grid@prsh01 ~]$ asmcmd find --type CONTROLFILE +data *
+data/PRSH01/CONTROLFILE/current.261.1122675497

4. Modify the parameter from sqlplus:

SQL> alter system set control_files='+data/PRSH01/CONTROLFILE/current.261.1122675497','+FRA/PRSH01/control02.ctl' scope=spfile;

5. Restart database

SQL> shutdown immediate;
SQL> startup

6. Double check new location

SQL> show parameter control_files

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
control_files			     string	 +DATA/PRSH01/CONTROLFILE/curre
						 nt.261.1122675497, +FRA/PRSH01
						 /control02.ctl

Move Oracle datafiles from filesystem to ASM using RMAN

1. Connect to the database using RMAN and move database into mount mode:

$ rman target /
RMAN> shutdown immediate
RMAN> startup mount

2. Get information about target datafiles and tempfiles:

RMAN> report schema;

using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name PRSH01

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    1020     SYSTEM               YES     /u01/app/oracle/oradata/PRSH01/system01.dbf
3    490      SYSAUX               NO      /u01/app/oracle/oradata/PRSH01/sysaux01.dbf
4    850      UNDOTBS1             YES     /u01/app/oracle/oradata/PRSH01/undotbs01.dbf
7    5        USERS                NO      /u01/app/oracle/oradata/PRSH01/users01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    114      TEMP                 32767       /u01/app/oracle/oradata/PRSH01/temp01.dbf

3. Copy datafiles from filesystem to ASM diskgroup, in our case to +DATA:

RMAN> copy datafile 1 to '+DATA';
RMAN> copy datafile 3 to '+DATA';
RMAN> copy datafile 4 to '+DATA';
RMAN> copy datafile 7 to '+DATA';
RMAN> switch datafile 1 to copy;
RMAN> switch datafile 3 to copy;
RMAN> switch datafile 4 to copy;
RMAN> switch datafile 7 to copy;

4. Place tempfile on +DATA:

RMAN> run{
2> set newname for tempfile 1 to '+DATA';
3> switch tempfile 1;
4> }

executing command: SET NEWNAME
renamed tempfile 1 to +DATA in control file

5. Double check that all files have a new name

RMAN> report schema;

Report of database schema for database with db_unique_name PRSH01

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    1020     SYSTEM               ***     +DATA/PRSH01/DATAFILE/system.256.1122674191
3    570      SYSAUX               ***     +DATA/PRSH01/DATAFILE/sysaux.257.1122674225
4    910      UNDOTBS1             ***     +DATA/PRSH01/DATAFILE/undotbs1.258.1122674235
7    5        USERS                ***     +DATA/PRSH01/DATAFILE/users.259.1122674253

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    114      TEMP                 32767       +DATA

6. Open database:

RMAN> alter database open;

7. Check new file names. Note tempfile name will also be generated:

RMAN> report schema;

Report of database schema for database with db_unique_name PRSH01

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    1020     SYSTEM               YES     +DATA/PRSH01/DATAFILE/system.256.1122674191
3    570      SYSAUX               NO      +DATA/PRSH01/DATAFILE/sysaux.257.1122674225
4    910      UNDOTBS1             YES     +DATA/PRSH01/DATAFILE/undotbs1.258.1122674235
7    5        USERS                NO      +DATA/PRSH01/DATAFILE/users.259.1122674253

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    114      TEMP                 32767       +DATA/PRSH01/TEMPFILE/temp.260.1122674673