Unable to connect to WebLogic console

The Server is not able to service this request: [Socket:000445]Connection rejected, filter blocked Socket, weblogic.security.net.FilterException: [Security:090220]rule 2

 

cd $FMW_HOME/user_projects/domains/EBS_domain_PROD/config
cp config.xml config.xml_org

erpr12.appsdba.info * * allow

Update deny to allow in the file config.xml

old

0.0.0.0/0 * * deny

New
0.0.0.0/0 * * allow

 

Bounce the admin server

 

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

Scripts related to TEMP Tablespace

To see Temp Space:
————————-

SELECT a.tablespace_name,ROUND((c.total_blocksb.block_size)/1024/1024/1024,2)
"Total Size [GB]",ROUND((a.used_blocksb.block_size)/1024/1024/1024,2) "Used_size[GB]",
ROUND(((c.total_blocks-a.used_blocks)b.block_size)/1024/1024/1024,2) "Free_size[GB]",
ROUND((a.max_blocksb.block_size)/1024/1024/1024,2) "Max_Size_Ever_Used[GB]",
ROUND((a.max_used_blocksb.block_size)/1024/1024/1024,2) "MaxSize_ever_Used_by_Sorts[GB]" ,
ROUND((a.used_blocks/c.total_blocks)100,2) "Used Percentage"
FROM V$sort_segment a,dba_tablespaces b,(SELECT tablespace_name,SUM(blocks)
total_blocks FROM dba_temp_files GROUP by tablespace_name) c
WHERE a.tablespace_name=b.tablespace_name AND a.tablespace_name=c.tablespace_name;

Query to check TEMP USAGE :
—————————————–

col name for a20
SELECT d.status "Status", d.tablespace_name "Name", d.contents "Type", d.extent_management
"ExtManag",
TO_CHAR(NVL(a.bytes / 1024 / 1024, 0),'99,999,990.900') "Size (M)", TO_CHAR(NVL(t.bytes,
0)/1024/1024,'99999,999.999') ||'/'||TO_CHAR(NVL(a.bytes/1024/1024, 0),'99999,999.999') "Used (M)",
TO_CHAR(NVL(t.bytes / a.bytes * 100, 0), '990.00') "Used %"
FROM sys.dba_tablespaces d, (select tablespace_name, sum(bytes) bytes from dba_temp_files group by
tablespace_name) a,
(select tablespace_name, sum(bytes_cached) bytes from
v$temp_extent_pool group by tablespace_name) t
WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = t.tablespace_name(+)
AND d.extent_management like 'LOCAL' AND d.contents like 'TEMPORARY';

 

To Check the Percentage Usage of Temp Tablespace:
—————————————————————–

select (s.tot_used_blocks/f.total_blocks)*100 as "percent used"
from (select sum(used_blocks) tot_used_blocks
from v$sort_segment where tablespace_name='TEMP') s,
(select sum(blocks) total_blocks
from dba_temp_files where tablespace_name='TEMP') f;

To find Sort Segment Usage by a particular User:
————————————————————-

SELECT s.username,s.sid,s.serial#,u.tablespace, u.contents, u.extents, u.blocks
FROM v$session s, v$sort_usage u
WHERE s.saddr=u.session_addr
order by u.blocks desc;

To find Total Free space in Temp Tablespace :
———————————————————

select tablespace_name, (free_blocks8)/1024/1024  FreeSpaceInGB,
(used_blocks8)/1024/1024  UsedSpaceInGB,
(total_blocks*8)/1024/1024  TotalSpaceInGB
from v$sort_segment where tablespace_name like '%TEMP%'

Get 10 sessions with the largest temp usage :
—————————————————

cursor bigtemp_sids is
select * from (
select s.sid,
s.status,
s.sql_hash_value sesshash,
u.SQLHASH sorthash,
s.username,
u.tablespace,
sum(u.blocks*p.value/1024/1024) mbused ,
sum(u.extents) noexts,
nvl(s.module,s.program) proginfo,
floor(last_call_et/3600)||':'||
floor(mod(last_call_et,3600)/60)||':'||
mod(mod(last_call_et,3600),60) lastcallet
from v$sort_usage u,
v$session s,
v$parameter p
where u.session_addr = s.saddr
and p.name = 'db_block_size'
group by s.sid,s.status,s.sql_hash_value,u.sqlhash,s.username,u.tablespace,
nvl(s.module,s.program),
floor(last_call_et/3600)||':'||
floor(mod(last_call_et,3600)/60)||':'||
mod(mod(last_call_et,3600),60)
order by 7 desc,3)
where rownum < 11;

Identifying WHO is currently using TEMP Segments :
——————————————————————

SELECT sysdate,a.username, a.sid, a.serial#, a.osuser, (b.blocksd.block_size)/1048576 MB_used, c.sql_text
FROM v$session a, v$tempseg_usage b, v$sqlarea c,
(select block_size from dba_tablespaces where tablespace_name='TEMP') d
WHERE b.tablespace = 'TEMP'
and a.saddr = b.session_addr
AND c.address= a.sql_address
AND c.hash_value = a.sql_hash_value
AND (b.blocksd.block_size)/1048576 > 1024
ORDER BY b.tablespace, 6 desc;

 

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

EXTERNAL TABLE

INTRODUCTION:

  • In this blog, we are going to create the external table
DESIGNATION:
  • This is easy to make and easy to insert the data quickly.
  • This is much faster than SQL * LOADER.
  • In this type of table, we cannot use a DML statement.
  • Bulk data can be easily inserted into the table.
OVERALL STEPS:

Step 1: Go to make a directory at the OS level

Step 2: After making the directory

Go to the directory, we have to create a text file and add the necessary values.

Step 3: We have to notify the location of the directory.

Step 4: Go to database, conn sys user

We have to permit for creation of a directory in that user by using the sys

Step 5: Create the directory and mention the location of the OS.

Step 6: Conn sys user,

We have to permit reading and writing to create a directory by using sys.

Step 7: Create the table and give the external format

Step 8: View the table

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

Running fnd_conc_clone.setup_clean manually is unsupported

 

Oracle Concurrent Processing – Version 12.2 and later

 

Running fnd_conc_clone.setup_clean manually is unsupported.

This API was designed for use internally and although Development has documented running this API in some setup notes it is only where it has been explicitly tested and for that specific setup.

For example, you will find some references to FND_CONC_CLONE.SETUP_CLEAN in the upgrade guide and other development-created documents. However, these are strategically placed.

Running this API outside of the specific places found in the official Oracle documentation (upgrade guide and other development documents) will cause problems and will break the functionality of your Oracle E-Business Suite system.

If fnd_conc_clone.setup_clean has been run, the only option to bring back the system to a stable and safe state will be to restore from a backup taken previously to run the API.

 

R12.2: When To Run fnd_conc_clone.setup_clean?

Ref:Doc ID 2130750.1

 

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

 

ASM TOOLS and Configuration Basic Commands.

1. check the asm process running:

[oracle@asm ~]$ ps -ef|grep smon
oracle 8648 23558 0 16:52 pts/0 00:00:00 grep –color=auto smon
oracle 9349 1 0 09:50 ? 00:00:00 ora_smon_oraasm
oracle 30582 1 0 Jan01 ? 00:00:02 asm_smon_+ASM
[oracle@asm ~]$ ps -ef|grep d.bin
oracle 10968 23558 0 16:54 pts/0 00:00:00 grep –color=auto d.bin
oracle 26445 1 0 Jan01 ? 00:09:46 /u01/app/grid/bin/ohasd.bin reboot
oracle 26662 1 0 Jan01 ? 00:12:17 /u01/app/grid/bin/oraagent.bin
oracle 26733 1 0 Jan01 ? 00:04:50 /u01/app/grid/bin/evmd.bin
oracle 26796 26733 0 Jan01 ? 00:04:47 /u01/app/grid/bin/evmlogger.bin -o /u01/app/grid/log/[HOSTNAME]/evmd/evmlogger.info -l /u01/app/grid/log/[HOSTNAME]/evmd/evmlogger.log
oracle 27085 1 0 Jan01 ? 00:00:02 /u01/app/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit
oracle 30264 1 0 Jan01 ? 00:05:25 /u01/app/grid/bin/cssdagent
oracle 30302 1 0 Jan01 ? 00:05:13 /u01/app/grid/bin/ocssd.bin
[oracle@asm ~]$ hostname
asm.localdomain
[oracle@asm ~]$ uname -r
3.10.0-957.el7.x86_64

2. check cluster resource status:

[oracle@asm ~]$ export PATH=$GRID_HOME/bin:$PATH
[oracle@asm ~]$ crsctl stat res -t
——————————————————————————–
Name Target State Server State details
——————————————————————————–
Local Resources
——————————————————————————–
ora.DATA.dg
ONLINE ONLINE asm STABLE
ora.LISTENER.lsnr
ONLINE ONLINE asm STABLE
ora.asm
ONLINE ONLINE asm Started,STABLE
ora.ons
OFFLINE OFFLINE asm STABLE
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.cssd
1 ONLINE ONLINE asm STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE asm STABLE
ora.oraasm.db
1 ONLINE ONLINE asm Open,HOME=/u01/app/o
racle/product/19.0.0
/dbhome_1,STABLE
——————————————————————————–

3. check database running status and start stop database:

[oracle@asm ~]$ srvctl status database -d oraasm
Database is running.
[oracle@asm ~]$

srvctl stop database -d oraasm
srvctl start database -d oraasm

4. check oracle home in grid:

[oracle@asm ~]$ . grid.env
[oracle@asm ~]$ env |grep ORA
ORACLE_SID=+ASM
ORACLE_BASE=/u01/app/oracle
ORACLE_HOSTNAME=asm.localdomain
ORACLE_TERM=xterm
ORACLE_HOME=/u01/app/grid
[oracle@asm ~]$

5. check oracle home in database:

[oracle@asm ~]$ . db.env
[oracle@asm ~]$ env |grep ORA
ORACLE_SID=oraasm
ORACLE_BASE=/u01/app/oracle
ORACLE_HOSTNAME=asm.localdomain
ORACLE_TERM=xterm
ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1
[oracle@asm ~]$

6. List the disks:

[root@asm ~]# cd /dev/
[root@asm dev]# ll sd*
brw-rw—-. 1 root disk 8, 0 Dec 31 10:45 sda
brw-rw—-. 1 root disk 8, 1 Dec 31 10:45 sda1
brw-rw—-. 1 root disk 8, 2 Dec 31 10:45 sda2
brw-rw—-. 1 root disk 8, 3 Dec 31 10:45 sda3
brw-rw—-. 1 root disk 8, 4 Dec 31 10:45 sda4
brw-rw—-. 1 root disk 8, 5 Dec 31 10:45 sda5
brw-rw—-. 1 root disk 8, 16 Dec 31 11:57 sdb
brw-rw—-. 1 root disk 8, 17 Dec 31 12:00 sdb1
brw-rw—-. 1 root disk 8, 32 Dec 31 11:58 sdc
brw-rw—-. 1 root disk 8, 33 Dec 31 12:00 sdc1

ASM TOOLS:
INSTALLATION TOOLS -oracleasm
ADMINSTRATION – asmcmd
DEBUGGING – kfod kfed ocrcheck

7. scan and list the disk using oracleasm:
[root@asm dev]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks…
Scanning system for ASM disks…
[root@asm dev]# oracleasm listdisks
DISK1
DISK2
[root@asm dev]#

8. asmcmd tool:

[oracle@asm ~]$ asmcmd
ASMCMD>
ASMCMD>

I. list the disk group
ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 4194304 30712 25860 0 25860 0 N DATA/
ASMCMD>

II. list datafile,controlfile

ASMCMD> cd DATA/
ASMCMD> ls
ASM/
ORAASM/
orapwasm
ASMCMD> cd ORAASM
ASMCMD> ls
86B637B62FE07A65E053F706E80A27CA/
CONTROLFILE/
D47CB418C2B91B66E053867EA8C0C5A0/
D47CEAB72C2F2513E053867EA8C0538D/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
ASMCMD> cd DATAFILE
ASMCMD> ls
SYSAUX.258.1092813853
SYSTEM.257.1092813819
UNDOTBS1.259.1092813869
USERS.260.1092813869
ASMCMD> pwd
+DATA/ORAASM/DATAFILE
ASMCMD>

9. check css,has status:

[oracle@asm ~]$ crsctl check has
CRS-4638: Oracle High Availability Services is online
[oracle@asm ~]$ crsctl check css
CRS-4529: Cluster Synchronization Services is online
[oracle@asm ~]$

10. check has version:

[oracle@asm ~]$ crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [19.0.0.0.0]
[oracle@asm ~]$ crsctl query has softwareversion
Oracle High Availability Services version on the local node is [19.0.0.0.0]
[oracle@asm ~]$

11. asmca —> GUI for create and manage diskgroup:

12. KFOD – discovering disks with the help of asm disk strings:
KFED – discovering disk headers

[oracle@asm ~]$ cd $ORACLE_HOME/bin
[oracle@asm bin]$ pwd
/u01/app/grid/bin
[oracle@asm bin]$ ll kfod
-rwxrwxr-x. 1 oracle oinstall 11453 Dec 31 12:22 kfod
[oracle@asm bin]$ ll kfed
-rwxrwxr-x. 1 oracle oinstall 142432 Dec 31 12:20 kfed

[oracle@asm bin]$ kfod status=TRUE disks=ALL
——————————————————————————–
Disk Size Header Path User Group
================================================================================
1: 20479 MB MEMBER /dev/oracleasm/disks/DISK1 oracle oinstall
2: 10239 MB MEMBER /dev/oracleasm/disks/DISK2 oracle oinstall
——————————————————————————–
ORACLE_SID ORACLE_HOME
================================================================================
+ASM /u01/app/grid
[oracle@asm bin]$

[oracle@asm bin]$ kfed read /dev/oracleasm/disks/DISK1 | egrep ‘name|size|type’
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD
kfdhdb.dskname: DATA_0000 ; 0x028: length=9
kfdhdb.grpname: DATA ; 0x048: length=4
kfdhdb.fgname: DATA_0000 ; 0x068: length=9
kfdhdb.secsize: 512 ; 0x0b8: 0x0200
kfdhdb.blksize: 4096 ; 0x0ba: 0x1000
kfdhdb.ausize: 4194304 ; 0x0bc: 0x00400000
kfdhdb.dsksize: 5119 ; 0x0c4: 0x000013ff
[oracle@asm bin]$

13. check olr and ocr location :
[oracle@asm ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 4
Total space (kbytes) : 491684
Used space (kbytes) : 82368
Available space (kbytes) : 409316
ID : 786336035
Device/File Name : /u01/app/grid/cdata/localhost/local.ocr
Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check bypassed due to non-privileged user

[oracle@asm ~]$
[oracle@asm ~]$ ocrcheck -local
Status of Oracle Local Registry is as follows :
Version : 4
Total space (kbytes) : 491684
Used space (kbytes) : 83496
Available space (kbytes) : 408188
ID : 476403298
Device/File Name : /u01/app/oracle/crsdata/asm/olr/asm_19.olr
Device/File integrity check succeeded

Local registry integrity check succeeded

Logical corruption check bypassed due to non-privileged user

[oracle@asm ~]$ ocrcheck -local -config
Oracle Local Registry configuration is :
Device/File Name : /u01/app/oracle/crsdata/asm/olr/asm_19.olr
[oracle@asm ~]$

14. Check the asm status in sysasm admin:

[oracle@asm ~]$ sqlplus / as sysasm

SQL*Plus: Release 19.0.0.0.0 – Production on Sun Jan 2 17:57:52 2022
Version 19.3.0.0.0

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

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.3.0.0.0

15. check instance type:

SQL> show parameter INSTANCE_TYPE

NAME TYPE VALUE
———————————— ———– ——————————
instance_type string ASM

16. spfile location:

SQL> show parameter spfile

NAME TYPE VALUE
———————————— ———– ——————————
spfile string +DATA/ASM/ASMPARAMETERFILE/reg
istry.253.1092745689

17. pfile creation:
SQL> create pfile from spfile;

File created.

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.3.0.0.0
[oracle@asm ~]$ cd $ORACLE_HOME/dbs
[oracle@asm dbs]$ ls
ab_+ASM.dat hc_+ASM.dat init+ASM.ora init.ora
[oracle@asm dbs]$ cat init+ASM.ora
+ASM.__oracle_base=’/u01/app/oracle’#ORACLE_BASE set from in memory value
.asm_diskstring=’/dev/oracleasm/disks’
.asm_power_limit=1
.large_pool_size=12M
.remote_login_passwordfile=’EXCLUSIVE’
[oracle@asm dbs]$ sqlplus / as sysasm

SQL*Plus: Release 19.0.0.0.0 – Production on Sun Jan 2 18:01:05 2022
Version 19.3.0.0.0

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

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.3.0.0.0

18. instance type and status:

SQL> select instance_name,status from v$instance;

INSTANCE_NAME STATUS
—————- ————
+ASM STARTED

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.3.0.0.0
[oracle@asm dbs]$ crsctl stat res -t
——————————————————————————–
Name Target State Server State details
——————————————————————————–
Local Resources
——————————————————————————–
ora.DATA.dg
ONLINE ONLINE asm STABLE
ora.LISTENER.lsnr
ONLINE ONLINE asm STABLE
ora.asm
ONLINE ONLINE asm Started,STABLE
ora.ons
OFFLINE OFFLINE asm STABLE
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.cssd
1 ONLINE ONLINE asm STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE asm STABLE
ora.oraasm.db
1 ONLINE ONLINE asm Open,HOME=/u01/app/o
racle/product/19.0.0
/dbhome_1,STABLE
——————————————————————————–
[oracle@asm dbs]$

19. ASMCMD check datafile and controlfile:

[oracle@asm dbs]$ asmcmd
ASMCMD>
ASMCMD>
ASMCMD>
ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 4194304 30712 25852 0 25852 0 N DATA/
ASMCMD> cd +DATA/oraasm/datafile
ASMCMD> ls
SYSAUX.258.1092813853
SYSTEM.257.1092813819
UNDOTBS1.259.1092813869
USERS.260.1092813869
ASMCMD> ls -l
Type Redund Striped Time Sys Name
DATAFILE UNPROT COARSE JAN 02 17:00:00 Y SYSAUX.258.1092813853
DATAFILE UNPROT COARSE JAN 02 17:00:00 Y SYSTEM.257.1092813819
DATAFILE UNPROT COARSE JAN 02 17:00:00 Y UNDOTBS1.259.1092813869
DATAFILE UNPROT COARSE JAN 02 17:00:00 Y USERS.260.1092813869
ASMCMD>

ASMCMD> cd +DATA/oraasm/parameterfile

ASMCMD> ls -l
Type Redund Striped Time Sys Name
PARAMETERFILE UNPROT COARSE JAN 02 17:00:00 Y spfile.274.1092815069
ASMCMD>

ASMCMD> ls -l
Type Redund Striped Time Sys Name
ASMPARAMETERFILE UNPROT COARSE DEC 31 12:00:00 Y REGISTRY.253.1092745689
ASMCMD> pwd
+DATA/ASM/ASMPARAMETERFILE
ASMCMD>

20. query to check asm_disk and asm disk_group:

SQL> select disk_number,name,path,header_status,mode_status,state,total_mb,free_mb from v$asm_disk;

DISK_NUMBER NAME PATH HEADER_STATU MODE_ST STATE TOTAL_MB FREE_MB
—————————————————————————————————-
0 DATA_0000 /dev/oracleasm/disks/DISK1 MEMBER ONLINE NORMAL 20476 17228

1 DATA_0001 /dev/oracleasm/disks/DISK2 MEMBER ONLINE NORMAL 10236 8624

 

SQL> select group_number,name,state,type from v$asm_diskgroup;

GROUP_NUMBER NAME STATE TYPE
———— —————————— ———– ——
1 DATA MOUNTED EXTERN

SQL>

 

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

Top 10 by Buffer Gets

Top 10 by Buffer Gets
=====================
set linesize 1000
set pagesize 1000
col sql for a70
set long 5000
col hash_value for 9999999999999999999999
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
buffer_gets, executions, buffer_gets/executions “Gets/Exec”,
hash_value,address
FROM GV$SQLAREA
WHERE buffer_gets > 10000
ORDER BY buffer_gets DESC)
WHERE rownum <=10
;
==================================================================================================
Top 10 by Physical Reads
========================
set linesize 100
set pagesize 100
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
disk_reads, executions, disk_reads/executions “Reads/Exec”,
hash_value,address
FROM V$SQLAREA
WHERE disk_reads > 1000
ORDER BY disk_reads DESC)
WHERE rownum <=10;
==================================================================================================
Top 10 by Executions
====================
set linesize 1000
set pagesize 1000
col sql for a70
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
executions, rows_processed, rows_processed/executions “Rows/Exec”,
hash_value,address
FROM GV$SQLAREA
WHERE executions > 100
ORDER BY executions DESC)
WHERE rownum <=10;
==================================================================================================
Top 10 by Parse Calls:
========================
set linesize 100
set pagesize 100
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
parse_calls, executions, hash_value,address
FROM V$SQLAREA
WHERE parse_calls > 1000
ORDER BY parse_calls DESC)
WHERE rownum <=10
;
=================================================================================================
Top 10 by Sharable Memory:
========================
set linesize 100
set pagesize 100
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
sharable_mem, executions, hash_value,address
FROM V$SQLAREA
WHERE sharable_mem > 1048576
ORDER BY sharable_mem DESC)
WHERE rownum <=10
;
==================================================================================================
Top 10 by Version Count:
========================
set linesize 100
set pagesize 100
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
version_count, executions, hash_value,address
FROM V$SQLAREA
WHERE version_count > 20
ORDER BY version_count DESC)
WHERE rownum <=10
;

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

How to find the bind variable values of the SQL statement using SQLID?

How to find the bind variable values of the SQL statement using SQLID?

SELECT sql_id,  b.name BIND_NAME,  b.value_string BIND_STRING   from gv$sql t
JOIN gv$sql_bind_capture b USING (sql_id) WHERE b.value_string IS NOT NULL
AND sql_id ='&SQLID';

Additional script which may be helpful at a later point in time:

To know the last executed query in the oracle and its hash value,sqlid

SELECT * FROM v$SQLTEXT_WITH_NEWLINES WHERE address =
  (SELECT prev_sql_addr FROM v$session WHERE audsid = userenv('SESSIONID'))
ORDER BY piece;

To know the SQL plan history of a sql using the sqlid:

select * from TABLE(DBMS_XPLAN.DISPLAY_AWR('&sqlid'));

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8