RMAN> restore spfile from '/dumps/VORCL/spfile_2m3t9864_1_1';
Starting restore at 30-JUN-25
using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/30/2025 04:04:23
RMAN-12010: automatic channel allocation initialization failed
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3701
Additional information: -755668061
RMAN> startup force nomount ; -------------------- startup force nomount
Oracle instance started
Total System Global Area 3221225472 bytes
Fixed Size 8797928 bytes
Variable Size 1476395288 bytes
Database Buffers 1728053248 bytes
Redo Buffers 7979008 bytes
RMAN> restore spfile from '/dumps/VORCL/spfile_2m3t9864_1_1';
Starting restore at 30-JUN-25
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=4 instance=vorcl11 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/30/2025 04:05:42
RMAN-06564: must use the TO clause when the instance is started with SPFILE
allocate channel then try !!!!
run {
allocate channel d1 type disk;
restore spfile from '/dumps/VORCL/spfile_2m3t9864_1_1';
}
RMAN> 2> 3> 4>
using target database control file instead of recovery catalog
allocated channel: d1
channel d1: SID=927 device type=DISK
Starting restore at 30-JUN-25
channel d1: restoring spfile from AUTOBACKUP /dumps/VORCL/spfile_2m3t9864_1_1
channel d1: SPFILE restore from AUTOBACKUP complete
Finished restore at 30-JUN-25
released channel: d1
Search This Blog
Total Pageviews
Monday, 30 June 2025
RMAN-06403: could not obtain a fully authorized session
Wednesday, 25 June 2025
Delete Foreign Keys and Primary Table Rows
Delete Foreign Keys and Primary Table Rows
https://github.com/eclaro/oracle_scripts/blob/master/p_delete_cascade.sql
1....
undefine schema
alter session set current_schema=&schema;
set serverout on size 1000000
drop table tmp_delete_cascade_stmt;
drop sequence seq_delete_cascade;
create table tmp_delete_cascade_stmt (
id number primary key, lev number, owner varchar2(30), table_name varchar2(30), parent_constraint varchar2(30),
child_constraint varchar2(30), statement clob, rows_deleted number);
create sequence seq_delete_cascade;
2..
create or replace procedure P_DELETE_CASCADE (
/*
Created by EDUARDO CLARO, 2018/03/05
Latest update, 2018/03/26
This procedure is intended to DELETE rows in a table, and all related child rows in all child tables.
The parameters are explained below
The procedure scans all child tables of all levels, recursively, and generates/executes the DELETE statements
*/
p_owner in varchar2, -- owner of the main table
p_table in varchar2, -- the main table
p_constraint in varchar2 default NULL, -- the PK/UK constraint to use in the main_stmt table (if NULL, all)
p_where in varchar2 default '1=1', -- the WHERE clause to define which rows will be DELETED in the main table
p_commit in number default 10000, -- COMMIT interval (rows of the main table)
p_mode in varchar2 default 'GS', -- modes of execution: any combination of:
-- G (generate statements)
-- S (show the statements)
-- X (execute)
-- C (commit)
-- A (ALL = G + X + C)
p_limit in number default 9999, -- limit the number of levels
p_level in number default 1, -- (recursive parameter: the current level of recursive calls)
p_parent_owner in varchar2 default NULL, -- (recursive parameter: the parent owner, will be used to build the recursive DELETE statement)
p_parent_table in varchar2 default NULL, -- (recursive parameter: the parent table, will be used to build the recursive DELETE statement)
p_parent_cols in varchar2 default NULL, -- (recursive parameter: the parent columns, will be used to build the recursive DELETE statement)
p_child_cols in varchar2 default NULL -- (recursive parameter: the child columns, will be used to build the recursive DELETE statement)
)
is
v_delstmt clob;
v_selstmt clob;
v_where clob;
v_rows number;
v_totalrows number;
v_parent_constraint varchar2(30);
v_child_constraint varchar2(30);
cursor C_CONS is
select
rcon.owner as r_owner, rcon.constraint_name as r_constraint_name, rcon.table_name as r_table_name,
listagg (rcol.column_name, ', ') WITHIN GROUP (ORDER BY rcol.owner, rcol.table_name, rcol.constraint_name) R_COLUMNS,
rcon.constraint_type as type,
con.owner, con.table_name, con.constraint_name,
listagg (col.column_name, ', ') WITHIN GROUP (ORDER BY col.owner, col.table_name, col.constraint_name) XCOLUMNS
from
all_constraints rcon
join all_cons_columns rcol
on rcol.owner=rcon.owner and rcol.table_name=rcon.table_name and rcol.constraint_name=rcon.constraint_name
left join all_constraints con
on rcon.owner = con.r_owner and rcon.constraint_name = con.r_constraint_name
left join all_cons_columns col
on col.owner=con.owner and col.table_name=con.table_name and col.constraint_name=con.constraint_name
and rcol.position = col.position
where rcon.owner = upper(p_owner) and rcon.table_name = upper(p_table) and rcon.constraint_type in ('P','U')
and rcon.constraint_name = nvl(upper(p_constraint),rcon.constraint_name) and rcon.status = 'ENABLED'
group by
rcon.owner, rcon.constraint_name, rcon.table_name, rcon.constraint_type,
con.owner, con.table_name, con.constraint_name
order by rcon.owner, rcon.constraint_name, rcon.constraint_type;
cursor C_STMT is
select * from tmp_delete_cascade_stmt order by lev desc, id;
begin
------------------------------------------------------------------------------------------------------------------------------------
--GENERATE STATEMENTS
if upper(p_mode) like '%G%' OR upper(p_mode) like '%A%' then
-- start truncating the tables and defining the where clause
if p_level = 1 then
execute immediate 'truncate table tmp_delete_cascade_stmt';
v_where := p_where;
else
v_where := '(' || p_child_cols || ') in (SELECT ' || chr(10) || p_parent_cols || ' FROM ' ||
p_parent_owner || '.' || p_parent_table || ' WHERE ' || chr(10) || p_where || ')' || chr(10);
end if;
-- show the level and table
if upper(p_mode) like '%S%' then
dbms_output.put_line('================================================================');
dbms_output.put_line('Level : ' || p_level);
dbms_output.put_line('Table : ' || p_table);
end if;
-- Build the delete statement
v_delstmt := 'DELETE FROM ' || p_owner || '.' || p_table || ' WHERE ' || v_where;
if upper(p_mode) like '%S%' then
dbms_output.put_line('Statement: ' || chr(10) || v_delstmt);
end if;
-- Verify if the table has rows to delete
v_selstmt := 'SELECT COUNT(1) FROM ' || p_owner || '.' || p_table || ' WHERE ' || v_where || ' AND ROWNUM = 1';
execute immediate v_selstmt into v_rows;
-- Enter in the recursive loop ONLY IF the level is under the limit AND there are rows to delete
if p_level < p_limit AND v_rows = 1 then
-- Loop of the parent and child constraints
for R_CONS in C_CONS loop
-- show the level and table
if C_CONS%ROWCOUNT > 1 and upper(p_mode) like '%S%' then
dbms_output.put_line('================================================================');
dbms_output.put_line('Level : ' || p_level);
dbms_output.put_line('Table : ' || p_table);
end if;
-- show the parent and child
if upper(p_mode) like '%S%' then
dbms_output.put_line('================================================================');
dbms_output.put_line('Parent Constraint: '||R_CONS.r_constraint_name);
dbms_output.put_line('Parent Table : '||R_CONS.r_table_name);
dbms_output.put_line('Child Constraint: '||R_CONS.constraint_name);
dbms_output.put_line('Child Table : '||R_CONS.table_name);
end if;
-- save values to use outside of the loop
v_parent_constraint := R_CONS.r_constraint_name;
v_child_constraint := R_CONS.constraint_name;
-- If there are child tables
if R_CONS.table_name IS NOT NULL then
-- recursively calls the same procedure
P_DELETE_CASCADE (
p_owner => R_CONS.owner,
p_table => R_CONS.table_name,
p_where => v_where,
p_commit => p_commit,
p_mode => p_mode,
p_limit => p_limit,
p_level => p_level + 1,
p_parent_owner => R_CONS.r_owner,
p_parent_table => R_CONS.r_table_name,
p_parent_cols => R_CONS.R_COLUMNS,
p_child_cols => R_CONS.XCOLUMNS
);
end if;
end loop;
end if;
-- Save the delete statement IF there are rows to delete
if v_rows = 1 then
if upper(p_mode) like '%S%' then
dbms_output.put_line('Registering the statement to delete table ' || p_table);
end if;
insert into tmp_delete_cascade_stmt(id, lev, owner, table_name, parent_constraint, child_constraint, statement)
values (seq_delete_cascade.nextval, p_level, p_owner, p_table, v_parent_constraint, v_child_constraint, v_delstmt);
else
if upper(p_mode) like '%S%' then
dbms_output.put_line('The statement has no rows to delete');
end if;
end if;
commit;
end if;
------------------------------------------------------------------------------------------------------------------------------------
--EXECUTE and COMMIT
if p_level = 1 AND (upper(p_mode) like '%A%' OR upper(p_mode) like '%X%' OR upper(p_mode) like '%C') then
for R_STMT in C_STMT loop
-- show the statements
if upper(p_mode) like '%S%' then
dbms_output.put_line('');
dbms_output.put_line('================================================================');
dbms_output.put_line('Statement ID: ' || R_STMT.id);
dbms_output.put_line(R_STMT.statement);
end if;
if upper(p_mode) like '%X%' OR upper(p_mode) like '%A%' then
v_rows := -1;
v_totalrows := 0;
while v_rows <> 0 loop
v_delstmt := R_STMT.statement || ' AND ROWNUM <= ' || p_commit;
execute immediate v_delstmt;
v_rows := SQL%ROWCOUNT;
v_totalrows := v_totalrows + v_rows;
if upper(p_mode) like '%C%' OR upper(p_mode) like '%A%' then
commit;
end if;
end loop;
update tmp_delete_cascade_stmt set rows_deleted = v_totalrows where id = R_STMT.id;
if upper(p_mode) like '%C%' OR upper(p_mode) like '%A%' then
commit;
end if;
if upper(p_mode) like '%S%' then
dbms_output.put_line(v_totalrows || ' rows deleted');
end if;
end if;
end loop;
end if;
exception
when others then
dbms_output.put_line('');
dbms_output.put_line('');
dbms_output.put_line('================================================================');
dbms_output.put_line('****** ERROR ******');
dbms_output.put_line(SQLCODE);
dbms_output.put_line(SQLERRM);
dbms_output.put_line('');
dbms_output.put_line('Owner: ' || p_owner);
dbms_output.put_line('Table: ' || p_table);
dbms_output.put_line('Level: ' || p_level);
dbms_output.put_line('Last DELETE Statement: ' || chr(10) || v_delstmt);
end;
/
In this demonstration, I created a table in the SYS schema.
select * from dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
set pagesize 300
select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7839 KING PRESIDENT 17-NOV-81 5000 10
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7566 JONES MANAGER 7839 02-APR-81 2975 20
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7934 MILLER CLERK 7782 23-JAN-82 1300 10
14 rows selected.
-- Generate
truncate table tmp_delete_cascade_stmt ;
begin
P_DELETE_CASCADE(
p_owner=>user,
p_table=>'DEPT',
p_where=>'DEPTNO in (30)',
p_mode => 'G' --- Generate only
);
end;
/
set linesize 300
col statement for a150 word_wrap
select table_name, statement, rows_deleted from tmp_delete_cascade_stmt order by lev desc, id;
TABLE_NAME STATEMENT ROWS_DELETED
------------------------------ -------------------------------------------------------------------------------- ------------
EMP DELETE FROM SYS.EMP WHERE (DEPTNO) in (SELECT
DEPTNO FROM SYS.DEPT WHERE
DEPTN
DEPT DELETE FROM SYS.DEPT WHERE DEPTNO in (30)
DELETE FROM SYS.EMP WHERE (DEPTNO) in (SELECT DEPTNO FROM SYS.DEPT WHERE DEPTNO in (30) );
SQL>
DELETE FROM SYS.EMP WHERE (DEPTNO) in (SELECT DEPTNO FROM SYS.DEPT WHERE DEPTNO in (30) );
6 rows deleted.
SQL> DELETE FROM SYS.DEPT WHERE DEPTNO in (30);
1 row deleted.
SQL>
SQL> truncate table tmp_delete_cascade_stmt ;
Table truncated.
SQL>
Generate, execute and show (but don't COMMIT yet) the DELETE statements
truncate table tmp_delete_cascade_stmt ;
begin
P_DELETE_CASCADE(
p_owner=>user,
p_table=>'DEPT',
p_where=>'DEPTNO in (30)',
p_mode => 'GX' ---
);
end;
/
SQL> 2 3 4 5 6 7 8 9
PL/SQL procedure successfully completed.
SQL> select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7839 KING PRESIDENT 17-NOV-81 5000 10
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7566 JONES MANAGER 7839 02-APR-81 2975 20
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7369 SMITH CLERK 7902 17-DEC-80 800 20
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
8 rows selected.
SQL> select * from dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
40 OPERATIONS BOSTON
====
truncate table tmp_delete_cascade_stmt ;
begin
sys.P_DELETE_CASCADE(
p_owner=>'ANUJ1',
p_table=>'T_INVOICE',
p_where=>q'[INVOICE_date =to_date('16-11-2025 00:06:07','dd-mm-yyyy hh24:mi:ss')]',
p_mode => 'G'
--p_mode => 'S' --show
);
end;
/
set linesize 500
col statement for a200 word_wrap
select table_name
,STATEMENT
--, DBMS_LOB.SUBSTR('STATEMENT', 1000,1)
--, rows_deleted
from tmp_delete_cascade_stmt order by lev desc, id;
TABLE_NAME STATEMENT
------------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
T_INVOICE_ITEM_DELIVERY DELETE FROM ANUJ1.T_INVOICE_ITEM_DELIVERY WHERE (INVOICE_ID, PRODUCT_ID) in (SEL
T_INVOICE_ITEM DELETE FROM ANUJ1.T_INVOICE_ITEM WHERE (INVOICE_ID) in (SELECT
INVOICE_ID FROM
T_INVOICE DELETE FROM ANUJ1.T_INVOICE WHERE INVOICE_date =to_date('16-11-2025 00:06:07','d
Wednesday, 18 June 2025
How to Patch Oracle Grid Infrastructure 21c ?
Oracle Grid Infrastructure 21c Patching Guide
1. Prerequisites
- Ensure enough disk space
- Confirm OPatch version is compatible
- Download and unzip patch files
2. Setup Environment
. oraenv export PATH=$ORACLE_HOME/OPatch:$PATH opatch version
2.1 Download software
-rw-r--r-- 1 grid oinstall 2262351607 Jun 18 06:16 p37642955_210000_Linux-x86-64.zip -rw-r--r-- 1 grid oinstall 72539776 Jun 18 06:20 p6880880_210000_Linux-x86-64.zip [grid@oragrid ~]$ du -sh 37642955/ 4.7G 37642955/ [grid@oragrid ~]$ df -Ph Filesystem Size Used Avail Use% Mounted on devtmpfs 7.8G 0 7.8G 0% /dev tmpfs 7.8G 638M 7.2G 9% /dev/shm tmpfs 7.8G 9.3M 7.8G 1% /run tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup /dev/mapper/cl-root 18G 5.2G 13G 29% / /dev/mapper/cl-u01 48G 25G 24G 52% /u01 /dev/sda1 976M 209M 701M 23% /boot /dev/mapper/cl-home 25G 7.1G 18G 29% /home [grid@oragrid ~]$ . oraenv ORACLE_SID = [grid] ? +ASM The Oracle base has been set to /u01/app/grid [grid@oragrid ~]$ export PATH=$ORACLE_HOME/OPatch:$PATH [grid@oragrid ~]$ opatch version OPatch Version: 12.2.0.1.46 OPatch succeeded.
3. Run Pre-checks
opatch util listorderedinactivepatches opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /path/to/patch_folder [grid@oragrid 37642955]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37642955/37657509| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed. [grid@oragrid 37642955]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37642955/37755423| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed. [grid@oragrid 37642955]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37642955/37775170| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed. [grid@oragrid 37642955]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37642955/37754564| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed. [grid@oragrid 37642955]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37642955/37678244| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed. [grid@oragrid 37642955]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37642955/37655430| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed.
4. Apply Patch
cd /home/grid/37642955
opatchauto apply /home/grid/37642955 -oh $ORACLE_HOME
[root@oragrid ~]# . oraenv
ORACLE_SID = [root] ? +ASM
The Oracle base has been set to /u01/app/grid
[root@oragrid ~]# export PATH=$ORACLE_HOME/OPatch:$PATH
[root@oragrid ~]# opatch version
OPatch Version: 12.2.0.1.46
OPatch succeeded.
Check status !!!
crsctl status resource -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE oragrid STABLE
ora.LISTENER.lsnr
ONLINE ONLINE oragrid STABLE
ora.asm
ONLINE ONLINE oragrid Started,STABLE
ora.ons
OFFLINE OFFLINE oragrid STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cdborcl.cdborcl1.pdb
1 OFFLINE OFFLINE STABLE
ora.cdborcl.db
1 OFFLINE OFFLINE Instance Shutdown,ST
ABLE
ora.cdborcl.orcl.pdb
1 OFFLINE OFFLINE STABLE
ora.cssd
1 ONLINE ONLINE oragrid STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE oragrid STABLE
ora.v14mpc.db
1 OFFLINE OFFLINE Instance Shutdown,ST
ABLE
ora.v14mpc.pdb21from19c.pdb
1 OFFLINE OFFLINE STABLE
ora.v14mpc.v14mpcpdb.pdb
1 OFFLINE OFFLINE STABLE
--------------------------------------------------------------------------------
[root@oragrid ~]#
[root@oragrid ~]# ps -ef|grep -i smon
grid 4543 1 0 05:40 ? 00:00:01 asm_smon_+ASM
root 14435 14175 0 11:51 pts/1 00:00:00 grep --color=auto -i smon
[root@oragrid ~]#
[root@oragrid ~]# echo $ORACLE_HOME
/u01/app/21.3.0/grid
$ORACLE_HOME/OPatch/opatchauto apply /home/grid/37642955 -oh $ORACLE_HOME
which opatchauto
/u01/app/21.3.0/grid/OPatch/opatchauto
==============
[root@oragrid ~]# opatchauto apply /home/grid/37642955 -oh $ORACLE_HOME
Invalid current directory. Please run opatchauto from other than '/root' and '/' directory.
And check if the home owner user has write permission set for the current directory.
opatchauto returns with error code = 2
====
change the Dir
[root@oragrid ~]# cd /home/grid/37642955
[root@oragrid 37642955]# opatchauto apply /home/grid/37642955 -oh $ORACLE_HOME
OPatchauto session is initiated at Wed Jun 18 11:57:09 2025
System initialization log file is /u01/app/21.3.0/grid/cfgtoollogs/opatchautodb/systemconfig2025-06-18_11-57-21AM.log.
Session log file is /u01/app/21.3.0/grid/cfgtoollogs/opatchauto/opatchauto2025-06-18_11-57-31AM.log
The id for this session is V5NY
Executing OPatch prereq operations to verify patch applicability on home /u01/app/21.3.0/grid
Patch applicability verified successfully on home /u01/app/21.3.0/grid
Executing patch validation checks on home /u01/app/21.3.0/grid
Patch validation checks successfully completed on home /u01/app/21.3.0/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/21.3.0/grid
Prepatch operation log file location: /u01/app/grid/crsdata/oragrid/crsconfig/hapatch_2025-06-18_11-59-11AM.log
CRS service brought down successfully on home /u01/app/21.3.0/grid
Start applying binary patch on home /u01/app/21.3.0/grid
Binary patch applied successfully on home /u01/app/21.3.0/grid
Running rootadd_rdbms.sh on home /u01/app/21.3.0/grid
Successfully executed rootadd_rdbms.sh on home /u01/app/21.3.0/grid
Performing postpatch operations on CRS - starting CRS service on home /u01/app/21.3.0/grid
Postpatch operation log file location: /u01/app/grid/crsdata/oragrid/crsconfig/hapatch_2025-06-18_12-11-09AM.log
CRS service started successfully on home /u01/app/21.3.0/grid
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:oragrid
SIHA Home:/u01/app/21.3.0/grid
Version:21.0.0.0.0
Summary:
==Following patches were SUCCESSFULLY applied:
Patch: /home/grid/37642955/37655430
Log: /u01/app/21.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-18_11-59-36AM_1.log
Patch: /home/grid/37642955/37657509
Log: /u01/app/21.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-18_11-59-36AM_1.log
Patch: /home/grid/37642955/37678244
Log: /u01/app/21.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-18_11-59-36AM_1.log
Patch: /home/grid/37642955/37754564
Log: /u01/app/21.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-18_11-59-36AM_1.log
Patch: /home/grid/37642955/37755423
Log: /u01/app/21.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-18_11-59-36AM_1.log
Patch: /home/grid/37642955/37775170
Log: /u01/app/21.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-18_11-59-36AM_1.log
OPatchauto session completed at Wed Jun 18 12:16:20 2025
Time taken to complete the session 19 minutes, 0 second
[root@oragrid 37642955]#
[root@oragrid 37642955]# crsctl status resource -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE oragrid STABLE
ora.LISTENER.lsnr
ONLINE ONLINE oragrid STABLE
ora.asm
ONLINE ONLINE oragrid Started,STABLE
ora.ons
OFFLINE OFFLINE oragrid STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cdborcl.cdborcl1.pdb
1 OFFLINE OFFLINE STABLE
ora.cdborcl.db
1 OFFLINE OFFLINE Instance Shutdown,ST
ABLE
ora.cdborcl.orcl.pdb
1 OFFLINE OFFLINE STABLE
ora.cssd
1 ONLINE ONLINE oragrid STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE oragrid STABLE
ora.v14mpc.db
1 OFFLINE OFFLINE Instance Shutdown,ST
ABLE
ora.v14mpc.pdb21from19c.pdb
1 OFFLINE OFFLINE STABLE
ora.v14mpc.v14mpcpdb.pdb
1 OFFLINE OFFLINE STABLE
--------------------------------------------------------------------------------
[root@oragrid 37642955]#
OPatchAuto successful.
All patches were applied successfully.
All patches were applied successfully.
5. Post-Patch Verification
crsctl status resource -t su - grid opatch lsinventory | grep -E "(^Patch.*applied)|(^Sub-patch)" [grid@oragrid ~]$ id uid=1100(grid) gid=54321(oinstall) groups=54321(oinstall),1020(osdba),54322(dba),54327(asmdba),54328(asmoper),54329(asmadmin) [grid@oragrid ~]$ [grid@oragrid ~]$ opatch lsinventory|grep -E "(^Patch.*applied)|(^Sub-patch)" Patch 37775170 : applied on Wed Jun 18 12:09:44 BST 2025 Patch 37755423 : applied on Wed Jun 18 12:09:23 BST 2025 Patch 37754564 : applied on Wed Jun 18 12:09:03 BST 2025 Patch 37678244 : applied on Wed Jun 18 12:08:49 BST 2025 Patch 37657509 : applied on Wed Jun 18 12:08:24 BST 2025 Patch 37655430 : applied on Wed Jun 18 12:04:19 BST 2025
6. Patches Applied
- 37655430
- 37657509
- 37678244
- 37754564
- 37755423
- 37775170
Note: Restart any database instances that were shut down during the process.
Monday, 16 June 2025
OPatch Apply for Grid 19.27 <<<< 37641958
Oracle Grid Infrastructure 19.27 Patch (37641958) - Application Log
📋 Patch Information
- Patch ID: 37641958
- Patch Type: GI RU 19.27.0.0.250415
- OPatch Required: 12.2.0.1.45 or later download only same base p6880880_190000_Linux-x86-64.zip v
- Oracle Home: /u01/app/19.0.0/grid
📁 Directory Structure of Patch Location
/home/grid/37641958/
├── 37654975/
├── 37643161/
├── 37762426/
├── 36758186/
├── 37642901/
├── README.txt
├── README.html
├── bundle.xml
└── automation/
⚠️ Pre-checks & Requirements
- Review
README.txtandREADME.htmlin patch directory.
OPatch Version Check
export PATH=$ORACLE_HOME/OPatch:$PATH opatch version # Output: OPatch Version: 12.2.0.1.46 ✅
Disk Space Verification
- Required: ~14.5GB
- Initial Free Space on /: 17GB
- After patch: 12GB available
Relocated Old Patch Data
mv /u01/app/19.0.0/grid/.patch_storage/36912597_Oct_11_2024_06_47_24/ /home/grid/
Create space .. Delete Inactive Patches (OPatch 12.2.0.1.37+) $ORACLE_HOME/OPatch/opatch lsinventory | grep -E "(^Patch.*applied)|(^Sub-patch)" ./opatch util listorderedinactivepatches ./opatch util deleteinactivepatches ./opatch util cleanup🔎 Conflict Checks for Each Subpatch
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37641958/<PATCH_ID>✔ Prereq "checkConflictAgainstOHWithDetail" passed.
[grid@srv1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37641958/37654975| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed. [grid@srv1 ~]$ [grid@srv1 ~]$ [grid@srv1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37641958/37643161| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed. [grid@srv1 ~]$ [grid@srv1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37641958/37762426| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed. [grid@srv1 ~]$ [grid@srv1 ~]$ [grid@srv1 ~]$ [grid@srv1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37641958/37642901| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed. [grid@srv1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/37641958/36758186| grep checkConflictAgainstOHWithDetail Prereq "checkConflictAgainstOHWithDetail" passed.🛠️ Patch Apply Procedure
⚠️ Ensure current directory is NOT /root or /
cd /home/grid/37641958 $ORACLE_HOME/OPatch/opatchauto apply /home/grid/37641958 -oh $ORACLE_HOME # ❌ Error: Incompatible OPatch version (23.x vs required 12.2.0.1.x)✅ Fixed by Replacing OPatch:
unzip -qqd /u01/app/19.0.0/grid /home/grid/p6880880_190000_Linux-x86-64.zip chown -R grid:oinstall OPatch ================ Download .. unzip -qqd /u01/app/19.0.0/grid /home/grid/p6880880_190000_Linux-x86-64.zip chown -R grid:oinstall OPatch +ASM:/u01/app/19.0.0/grid:N # line added by Agent [root@srv1 grid]# . oraenv ORACLE_SID = [root] ? +ASM The Oracle base has been set to /u01/app/grid [root@srv1 grid]# export PATH=$ORACLE_HOME/OPatch:$PATH [root@srv1 grid]# [root@srv1 grid]# [root@srv1 grid]# echo $ORACLE_HOME /u01/app/19.0.0/grid [root@srv1 grid]# $ORACLE_HOME/OPatch/opatchauto apply /home/grid/37641958 -oh $ORACLE_HOME OPatchauto session is initiated at Mon Jun 16 13:10:57 2025 System initialization log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2025-06-16_01-11-06PM.log. Session log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2025-06-16_01-11-12PM.log The id for this session is JATU Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0.0/grid Patch applicability verified successfully on home /u01/app/19.0.0/grid Executing patch validation checks on home /u01/app/19.0.0/grid Patch validation checks successfully completed on home /u01/app/19.0.0/grid Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.0.0/grid Prepatch operation log file location: /u01/app/grid/crsdata/srv1/crsconfig/hapatch_2025-06-16_01-13-40PM.log CRS service brought down successfully on home /u01/app/19.0.0/grid Start applying binary patch on home /u01/app/19.0.0/grid Binary patch applied successfully on home /u01/app/19.0.0/grid Running rootadd_rdbms.sh on home /u01/app/19.0.0/grid Successfully executed rootadd_rdbms.sh on home /u01/app/19.0.0/grid Performing postpatch operations on CRS - starting CRS service on home /u01/app/19.0.0/grid Postpatch operation log file location: /u01/app/grid/crsdata/srv1/crsconfig/hapatch_2025-06-16_01-27-11PM.log CRS service started successfully on home /u01/app/19.0.0/grid OPatchAuto successful. --------------------------------Summary-------------------------------- Patching is completed successfully. Please find the summary as follows: Host:srv1 SIHA Home:/u01/app/19.0.0/grid Version:19.0.0.0.0 Summary: ==Following patches were SKIPPED: Patch: /home/grid/37641958/36758186 Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-16_13-11-36PM_1.log Reason: /home/grid/37641958/36758186 is not required to be applied to oracle home /u01/app/19.0.0/grid ==Following patches were SUCCESSFULLY applied: Patch: /home/grid/37641958/37642901 Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-16_13-14-37PM_1.log Patch: /home/grid/37641958/37643161 Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-16_13-14-37PM_1.log Patch: /home/grid/37641958/37654975 Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-16_13-14-37PM_1.log Patch: /home/grid/37641958/37762426 Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-16_13-14-37PM_1.log OPatchauto session completed at Mon Jun 16 13:30:20 2025 Time taken to complete the session 19 minutes, 14 seconds Time taken to complete the session 19 minutes, 14 seconds After Patch space [root@srv1 grid]# df -Ph Filesystem Size Used Avail Use% Mounted on devtmpfs 3.8G 0 3.8G 0% /dev tmpfs 3.8G 1.1G 2.7G 30% /dev/shm tmpfs 3.8G 9.7M 3.8G 1% /run tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup /dev/mapper/ol-root 50G 39G 12G 77% / --------------<<<<<< /dev/sda1 1014M 233M 782M 23% /boot /dev/mapper/ol-home 339G 9.3G 330G 3% /home tmpfs 771M 20K 771M 1% /run/user/54323 tmpfs 771M 0 771M 0% /run/user/0 [root@srv1 grid]#✅ Successful Patch Output Summary
==Following patches were SKIPPED: Patch: 36758186 - Not required ==Following patches were SUCCESSFULLY applied: Patch: 37642901 Patch: 37643161 Patch: 37654975 Patch: 37762426 Total Time: 19 minutes, 14 seconds📌 Post Patch Verification
Patch Inventory Check
opatch lsinventory | grep -E "(^Patch.*applied)|(^Sub-patch)" Patch 37762426 applied at: Jun 16 13:26:01 GST 2025 Patch 37654975 applied at: Jun 16 13:25:36 GST 2025 Patch 37643161 applied at: Jun 16 13:24:49 GST 2025 Patch 37642901 applied at: Jun 16 13:19:57 GST 2025SQL Version Check
sqlplus / as sysasm SELECT * FROM v$version; # Output: Version 19.27.0.0.0Filesystem Usage After Patch
/dev/mapper/ol-root 50G 39G 12G 77% /👨💻 Check Patch and Environment
. oraenv ORACLE_SID = +ASM export PATH=$ORACLE_HOME/OPatch:$PATH [root@srv1 grid]# su - grid Last login: Mon Jun 16 13:46:05 +04 2025 on pts/2 [grid@srv1 ~]$ cat /etc/oratab #Backup file is /u01/app/grid/crsdata/srv1/output/oratab.bak.srv1.grid line added by Agent # # This file is used by ORACLE utilities. It is created by root.sh # and updated by either Database Configuration Assistant while creating # a database or ASM Configuration Assistant while creating ASM instance. # A colon, ':', is used as the field terminator. A new line terminates # the entry. Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:: # # The first and second fields are the system identifier and home # directory of the database respectively. The third field indicates # to the dbstart utility that the database should , "Y", or should not, # "N", be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # oradb:/u01/app/oracle/product/19.0.0/db_1:N # line added by Agent doradb:/u01/app/oracle/product/19.0.0/db_1:N # line added by Agent +ASM:/u01/app/19.0.0/grid:N # line added by Agent [grid@srv1 ~]$ . oraenv ORACLE_SID = [+ASM] ? The Oracle base remains unchanged with value /u01/app/grid [grid@srv1 ~]$ crsctl query has releaseversion Oracle High Availability Services release version on the local node is [19.0.0.0.0] [grid@srv1 ~]$ crsctl query has softwareversion Oracle High Availability Services version on the local node is [19.0.0.0.0] [grid@srv1 ~]$ crsctl query has releasepatch Oracle Clusterware release patch level is [2119256259] and the complete list of patches [36758186 37642901 37643161 37654975 37762426 ] have been applied on the local node. The release patch string is [19.27.0.0.0]. [grid@srv1 ~]$ crsctl query has softwarepatch Oracle Clusterware patch level on node srv1 is [2119256259]. ******************************************************************************************* [grid@srv1 ~]$ crsctl status res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATADISK.dg ONLINE ONLINE srv1 STABLE ora.LISTENER.lsnr ONLINE ONLINE srv1 STABLE ora.OCRDISK.dg ONLINE ONLINE srv1 STABLE ora.asm ONLINE ONLINE srv1 Started,STABLE ora.ons OFFLINE OFFLINE srv1 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cssd 1 ONLINE ONLINE srv1 STABLE ora.diskmon 1 OFFLINE OFFLINE STABLE ora.evmd 1 ONLINE ONLINE srv1 STABLE ora.oradb.db 1 OFFLINE OFFLINE Instance Shutdown,ST ABLE ora.oradb.prodb_srvp.svc 1 OFFLINE OFFLINE STABLE -------------------------------------------------------------------------------- [grid@srv1 ~]$
Sunday, 15 June 2025
Oracle 19c Installation on CentOS Stream 9
Oracle Database 19c Installation on CentOS Stream 9
1. Environment Details
OS: CentOS Stream release 9
Disk Layout: / (20G), /u01 (100G), /home (25G), /boot (960M)
Oracle Version: 19.27.0.0.0
Patch: 37642901
2. Required Packages
dnf install -y bc binutils gcc gcc-c++ glibc glibc-devel ksh \
libaio libaio-devel libX11 libXau libXi libXtst libgcc libnsl \
libstdc++ libstdc++-devel libxcb make smartmontools sysstat \
elfutils-libelf elfutils-libelf-devel libXrender libXrender-devel
3. User and Directory Setup
groupadd -g 54321 oinstall
groupadd -g 54322 dba
useradd -u 54321 -g oinstall -G dba oracle
passwd oracle
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
4. Kernel Parameters
# /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
sysctl -p
5. Resource Limits
# /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
# /etc/pam.d/login
session required pam_limits.so
6. Oracle Environment Variables
# ~/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export ORACLE_SID=vihaan
export PATH=$PATH:$ORACLE_HOME/bin
7. Installation and Patching
unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME
mv OPatch OPatch-backup
unzip -qqd $ORACLE_HOME p6880880_190000_Linux-x86-64.zip
export PATH=$ORACLE_HOME/OPatch:$PATH
./opatch version
# Output: 12.2.0.1.46
export CV_ASSUME_DISTID=OL8
./runInstaller -applyRU /home/oracle/37642901
# Ignore compat-libcap1-1.10 check when prompted
8. Post-Installation
???
$ORACLE_HOME/bin/relink as_installed
# Verify patches
./opatch lsinventory | grep -E "(^Patch.*applied)|(^Sub-patch)"
Patch 37642901 : applied on Sat Jun 14 10:33:37 BST 2025
Patch 29585399 : applied on Thu Apr 18 08:21:33 BST 2019
9. Database Startup
sqlplus / as sysdba
SQL> Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.27.0.0.0
SQL> alter pluggable database VIHAAN27 open ;
Warning: PDB altered with errors.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY YES
3 VIHAAN27 READ WRITE YES
=====================
steps to solve this
Execute datapatch individually in each of the containers, starting with CDB$ROOT :
1. Apply datapatch is CDB$ROOT :
===================================
./datapatch -verbose -pdbs CDB\$ROOT
2. Apply datapatch is PDB :
===================================
$ ./datapatch -verbose -pdbs
3. Apply datapatch is PDB$SEED :
==================================
SQL> alter session set container=PDB$SEED;
SQL> alter session set "_oracle_script"=TRUE;
SQL> alter pluggable database pdb$seed close immediate instances=all;
SQL> alter pluggable database pdb$seed OPEN READ WRITE;
SQL> select open_mode from v$database;
SQL> exit
Execute: ./datapatch -verbose -pdbs PDB\$SEED
SQL> alter session set "_oracle_script"=FALSE;
4. show pdbs -> If this shows the PDB$SEED in restricted mode, bounce the database once.
5. Check for the relevant patch existence in the registry$sqlpatch for all the containers (CDB$ROOT, PDB$SEED and PDB) :
set linesize 150
col logfile for a90
select patch_id, action, logfile, status from registry$sqlpatch;
============================================
alter session set container=CDB$ROOT;
set linesize 200
column name format a10
column cause format a10
column type format a10
column message format a95
column action format a30
col TIME for a30
select TIME,name, cause, type, message,status from PDB_PLUG_IN_VIOLATIONS where status = 'PENDING';
TIME NAME CAUSE TYPE MESSAGE STATUS
------------------------------ ---------- ---------- ---------- ----------------------------------------------------------------------------------------------- ---------
25-JUN-25 10.37.19.783536 VIHAAN27 SQL Patch ERROR 19.27.0.0.0 Release_Update 2504061311: APPLY with status WITH ERRORS in the PDB PENDING
25-JUN-25 10.50.00.392479 PDB$SEED SQL Patch ERROR 19.27.0.0.0 Release_Update 2504061311: APPLY with status WITH ERRORS in the PDB PENDING
QL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY YES
3 VIHAAN27 READ WRITE YES
[root@ora19 oracle]# updatedb
[root@ora19 oracle]# locate datapatch
/u01/app/oracle/product/19.0.0/dbhome_1/OPatch/datapatch
./datapatch -verbose -pdbs CDB\$ROOT
SQL Patching tool version 19.27.0.0.0 Production on Wed Jun 25 10:48:28 2025
Copyright (c) 2012, 2025, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_4538_2025_06_25_10_48_28/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Note: Datapatch will only apply or rollback SQL fixes for PDBs
that are in an open state, no patches will be applied to closed PDBs.
Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
(Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
No interim patches found
Current state of release update SQL patches:
Binary registry:
19.27.0.0.0 Release_Update 250406131139: Installed
PDB CDB$ROOT:
Applied 19.27.0.0.0 Release_Update 250406131139 successfully on 14-JUN-25 11.00.09.198524
Adding patches to installation queue and performing prereq checks...done
Installation queue:
For the following PDBs: CDB$ROOT
No interim patches need to be rolled back
No release update patches need to be installed
No interim patches need to be applied
SQL Patching tool complete on Wed Jun 25 10:48:40 2025
[oracle@ora19 OPatch]$ sqlme
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jun 25 10:49:17 2025
Version 19.27.0.0.0
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.27.0.0.0
SQL> alter session set container=PDB$SEED;
Session altered.
SQL> alter session set "_oracle_script"=TRUE;
Session altered.
SQL> alter pluggable database pdb$seed close immediate instances=all;
Pluggable database altered.
SQL> alter pluggable database pdb$seed OPEN READ WRITE;
Warning: PDB altered with errors.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL> alter session set container=PDB$SEED;
Session altered.
@?/rdbms/admin/utlrp.sql remotely - Oracle Forums
SQL> alter session set container=PDB$SEED;
Session altered.
SQL> @?/rdbms/admin/utlrp.sql
Session altered.
./datapatch -verbose -pdbs PDB\$SEED
SQL Patching tool version 19.27.0.0.0 Production on Wed Jun 25 11:02:59 2025
Copyright (c) 2012, 2025, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_5662_2025_06_25_11_02_59/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Note: Datapatch will only apply or rollback SQL fixes for PDBs
that are in an open state, no patches will be applied to closed PDBs.
Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
(Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
No interim patches found
Current state of release update SQL patches:
Binary registry:
19.27.0.0.0 Release_Update 250406131139: Installed
PDB PDB$SEED:
Applied 19.27.0.0.0 Release_Update 250406131139 successfully on 25-JUN-25 10.57.08.184703
Adding patches to installation queue and performing prereq checks...done
Installation queue:
For the following PDBs: PDB$SEED
No interim patches need to be rolled back
No release update patches need to be installed
No interim patches need to be applied
SQL Patching tool complete on Wed Jun 25 11:03:11 2025
SQL> alter session set container=VIHAAN27 ;
Session altered.
SQL> alter session set container=VIHAAN27 ;
Session altered.
SQL> @?/rdbms/admin/utlrp.sql
Session altered.
./datapatch -verbose -pdbs VIHAAN27
SQL Patching tool version 19.27.0.0.0 Production on Wed Jun 25 11:05:23 2025
Copyright (c) 2012, 2025, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_6098_2025_06_25_11_05_23/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Note: Datapatch will only apply or rollback SQL fixes for PDBs
that are in an open state, no patches will be applied to closed PDBs.
Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
(Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
No interim patches found
Current state of release update SQL patches:
Binary registry:
19.27.0.0.0 Release_Update 250406131139: Installed
PDB VIHAAN27:
Applied 19.27.0.0.0 Release_Update 250406131139 with errors on 14-JUN-25 11.05.28.279212
Adding patches to installation queue and performing prereq checks...done
Installation queue:
For the following PDBs: VIHAAN27
No interim patches need to be rolled back
Patch 37642901 (Database Release Update : 19.27.0.0.250415 (37642901)):
Apply from 19.1.0.0.0 Feature Release to 19.27.0.0.0 Release_Update 250406131139
No interim patches need to be applied
WARNING: Following components are NOT in a valid state.
This could cause patching failure. If it does, consider
running utlrp.sql to bring components to VALID state.
Then, re-run datapatch.
VIHAAN27 : SDO [INVALID]
Installing patches...
Patch installation complete. Total patches installed: 1
Validating logfiles...done
Patch 37642901 apply (pdb VIHAAN27): SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/37642901/27123174/37642901_apply_VIHAAN_VIHAAN27_2025Jun25_11_05_36.log (no errors)
SQL Patching tool complete on Wed Jun 25 11:12:50 2025
set linesize 200
col logfile for a90
select patch_id, action, logfile, status from registry$sqlpatch;
PATCH_ID ACTION LOGFILE STATUS
---------- ------------------------------ ------------------------------------------------------------------------------------------ -------------------------
37642901 APPLY /u01/app/oracle/cfgtoollogs/sqlpatch/37642901/27123174/37642901_apply_VIHAAN_CDBROOT_2025J SUCCESS
un14_10_47_31.log
SQL> alter pluggable database VIHAAN27 open ;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 VIHAAN27 READ WRITE NO
SQL>
VIHAAN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora19.lan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = vihaan)
)
)
LISTENER_VIHAAN =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora19.lan)(PORT = 1521))
[oracle@ora19 admin]$ lsnrctl service|grep -i vihaan27
Service "vihaan27" has 1 instance(s).
VIHAAN27 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora19.lan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = VIHAAN27)
)
)
VIHAAN27 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora19.lan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = VIHAAN27)
)
)
[oracle@ora19 admin]$ tnsping VIHAAN27
TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 25-JUN-2025 11:25:41
Copyright (c) 1997, 2025, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/19.0.0/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ora19.lan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = VIHAAN27)))
OK (20 msec)
sqlplus 'sys/sys@VIHAAN27 as sysdba'
sqlplus 'sys/sys@VIHAAN27 as sysdba'
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jun 25 11:27:35 2025
Version 19.27.0.0.0
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.27.0.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 VIHAAN27 READ WRITE NO
SQL>
Requirements for Installing Oracle Database/Client 19c (19.22 or higher) on OL9 or RHEL9 64-bit (x86-64)
(Doc ID 2982833.1)
bc
binutils
compat-openssl11
elfutils-libelf
fontconfig
glibc
glibc-devel
ksh
libaio
libasan
liblsan
libX11
libXau
libXi
libXrender
libXtst
libxcrypt-compat
libgcc
libibverbs
libnsl
librdmacm
libstdc++
libxcb
libvirt-libs
make
policycoreutils
policycoreutils-python-utils
smartmontools
sysstat
Note - For 64-Bit Oracle Database Client Installs,below Packages are required
libnsl2
libnsl2-devel
Subscribe to:
Comments (Atom)
Oracle DBA
anuj blog Archive
- ► 2011 (362)
