Never give up and never stop.... keep trying until you win or die..
Wednesday, September 28, 2022
RPM based Oracle 19c Database installation and Creation in RHEL7 64bit
Thursday, September 22, 2022
Undo tablespace usage
Below are the undo tablespace usage sql queries
select a.sid, a.serial#, a.username, b.used_urec used_undo_record, b.used_ublk used_undo_blocks
from v$session a, v$transaction b
where a.saddr=b.ses_addr ;
2.
select
s.sid,s.serial#,
NVL(s.username, 'NA') orauser,
s.program,r.name undoseg,
t.used_ublk * TO_NUMBER(x.value)/1024||'K' "Undo"
from
sys.v_$rollname r,
sys.v_$session s,
sys.v_$transaction t,
sys.v_$parameter x
where s.taddr = t.addr
AND r.usn = t.xidusn(+)
AND x.name = 'db_block_size';
3.
SET LINESIZE 200
COLUMN username FORMAT A15
SELECT s.username,
s.sid,
s.serial#,
t.used_ublk,
t.used_urec,
rs.segment_name,
r.rssize,
r.status
FROM v$transaction t,
v$session s,
v$rollstat r,
dba_rollback_segs rs
WHERE s.saddr = t.ses_addr
AND t.xidusn = r.usn
AND rs.segment_id = t.xidusn
ORDER BY t.used_ublk DESC;
4.
r.name rbs,
nvl(s.username, ‘None’) oracle_user,
s.osuser client_user,
p.username unix_user,
to_char(s.sid)||’,’||to_char(s.serial#) as sid_serial,
p.spid unix_pid,
TO_CHAR(s.logon_time, ‘mm/dd/yy hh24:mi:ss’) as login_time,
t.used_ublk * 8192 as undo_BYTES,
st.sql_text as sql_text
FROM gv$process p,
v$rollname r,
gv$session s,
gv$transaction t,
gv$sqlarea st
WHERE p.inst_id=s.inst_id
AND p.inst_id=t.inst_id
AND s.inst_id=st.inst_id
AND s.taddr = t.addr
AND s.paddr = p.addr(+)
AND r.usn = t.xidusn(+)
AND s.sql_address = st.address
AND t.used_ublk * 8192 > 1073741824
ORDER
BY undo_BYTES desc
/
5.
select s.sid, t.name, s.value
from v$sesstat s, v$statname t
where s.statistic#=t.statistic#
and t.name='undo change vector size'
order by s.value desc;
select sql.sql_text, t.used_urec records, t.used_ublk blocks,
(t.used_ublk*8192/1024) kb from v$transaction t,
v$session s, v$sql sql
where t.addr=s.taddr
and s.sql_id = sql.sql_id
and s.username ='&USERNAME';
select SID,PROGRAM from v$session where TYPE='BACKGROUND';
col machine for a10;
select s.sid,s.serial#,username,s.machine,
t.used_ublk ,t.used_urec,(rs.rssize)/1024/1024 MB,rn.name
from v$transaction t,v$session s,v$rollstat rs, v$rollname rn
where t.addr=s.taddr and rs.usn=rn.usn and rs.usn=t.xidusn and rs.xacts>0;
Wednesday, September 14, 2022
While startup "ORA-00845: MEMORY_TARGET not supported on this system"
While Startup got "While startup "ORA-00845: MEMORY_TARGET not supported on this system"
ORA-00845: MEMORY_TARGET not supported on this system
Tuesday, September 13, 2022
Oralce Golden Gate few known issue
Below are the few known issue which we have encountered and it is documented in Oracle.
Issue - ggsci: error while loading shared libraries: libnnz12.so: cannot open shared object file: No such file or directory
Solution - LD_LIBRARY_PATH should contain oracle client path.
[oracle@oranode1 ~]$ ggsci
ggsci: error while loading shared libraries: libnnz12.so: cannot open shared object file: No such file or directory
[oracle@oranode1 ~]$ echo $LD_LIBRARY_PATH
/u02/app/gg_home/lib:
[oracle@oranode1 ~]$ export LD_LIBRARY_PATH=/u02/app/gg_home/lib:/u02/app/oracle/product/12.2.0/dbhome_1/lib
[oracle@oranode1 ~]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.2.2 OGGCORE_12.2.0.2.0_PLATFORMS_170630.0419_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Jun 30 2017 16:12:28
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
GGSCI (oranode1.test.com) 1>
Able to login .
=====================================================
Issue - Cannot load ICU resource bundle 'ggMessage', error code 2 - No such file or directory
Solution - permission issue on ggMessage.dat file.
[oracle@oranode1 ~]$ ggsci
Cannot load ICU resource bundle 'ggMessage', error code 2 - No such file or directory
Aborted (core dumped)
[oracle@oranode1 ~]$ cd $GG_HOME
[oracle@oranode1 gg_home]$ ls -ltr *.dat
-rw-r-----. 1 oracle oracle 43150372 Jun 30 2017 ggparam.dat
-rw-r-----. 1 oracle oracle 1866528 Jun 30 2017 ggMessage.dat
[oracle@oranode1 gg_home]$ chmod 775 ggMessage.dat ggparam.dat
[oracle@oranode1 gg_home]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.2.2 OGGCORE_12.2.0.2.0_PLATFORMS_170630.0419_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Jun 30 2017 16:12:28
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
GGSCI (oranode1.test.com) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
GGSCI (oranode1.test.com) 2> exit
Oracle 12c runInstaller pre-check failed - ( Soft Limit - Maximum stack size )
Oracle 12c runInstaller pre-check failed - ( Soft Limit - Maximum stack size )
During the run of 12c runInstaller we got below error:
As a super user ran below:
ulimit -Ss 10240
and set the below on /etc/security/limits.conf
oracle soft stack 10240
Rerun the runInstaller.
Thanks,
PRVF-0002 while running 12c runInstaller
PRVF-0002 while running runInstaller
While running 12c runInstaller you might get below error:
Sunday, September 11, 2022
Be careful while remove the /var/tmp/.oracle directory .. RAC hidden socket information
Be careful while remove the /var/tmp/.oracle directory .. RAC hidden socket information
Sometimes oracle suggests you remove files from the .oracle directory. Be careful while removing the contents from this hidden directory. We had landed one scenario where one of the colleagues removed the .oracle directory. Good thing is that it was in test instance.
Impact - Clusterware services are not coming up
Solution:
Stop all the clusterware services from all the nodes.
Create the directory and give the permission.
mkdir .oracle
chmod 01777 .oracle
After above action plan services came up fine.
SM