Posts
Display Session status associated with the specified os process id SQL Code 1select s.username 2, s.sid 3, s.serial# 4, p.spid 5, last_call_et 6, status 7from V$SESSION s 8, V$PROCESS p 9where s.PADDR = p.ADDR 10and p.spid='&pid' 11/ Sample Oracle Output 1Enter value for pid: 9999 2old 10: and p.spid='&pid' 3new 10: …
Read MoreShow all the Oracle database used or installed Oracle features using dba_feature_usage_statistics Discover which database features have been actively used, providing insights for license management, optimization, and future planning. Show all the Oracle database installed features for an instance SQL Code 1select name …
Read MoreSelect Oracle user info including os pid SQL Code 1col "SID/SERIAL" format a10 2col username format a20 3col osuser format a15 4col program format a50 5select s.sid || ',' || s.serial# "SID/SERIAL" 6, s.username 7, s.osuser 8, p.spid "OS PID" 9, s.program 10from v$session s 11, v$process p 12Where s.paddr = p.addr …
Read MoreOracle sessions sorted by logon time Track idle time for user sessions to uncover potential resource leaks, optimize database performance, and maintain security best practices. SQL Code 1et lines 100 pages 999 2select username 3, floor(last_call_et / 60) "Minutes" 4, status 5from v$session 6where username is not null …
Read MoreDisplay all Oracle users by the time since last user activity Identify idle user sessions and their inactive duration for resource optimization, performance tuning, and security best practices. SQL Code 1set lines 100 pages 999 2select username 3, floor(last_call_et / 60) "Minutes" 4, status 5from v$session 6where …
Read MoreIdentify if Java is installed in the Oralce database using all_objects Gain visibility into the quantity of Java objects owned by the SYS user, aiding in understanding database usage and potential security considerations. This will return 9000'ish if it is... SQL Code 1select count(*) 2from all_objects 3where …
Read MoreShow the ten largest oracle objects in the database using dba_segments Pinpoint the segments occupying the most storage space within the database to optimize storage usage, address potential bottlenecks, and enhance performance. SQL Code 1col owner format a15 2col segment_name format a30 3col segment_type format a15 …
Read MoreOracle SQL Scripts and Database Commands 23c 21c 19c 18c 12c 11g 10g 9i 8i We are in the process of building a list of simple scripts used every day by DBA and others. If you have your own scripts you reuse in a text file on you workstation please send it to us. To look at other scripts see the Oracle Scripts Tag …
Read MoreShow all the Oracle users connected to the database SQL Code 1set lines 100 pages 999 2col ID format a15 3col USERNAME format a20 4select username 5, sid || ',' || serial# "ID" 6, status 7, last_call_et "Last Activity" 8from v$session 9where username is not null 10order by status desc 11, last_call_et desc 12/ Sample …
Read MoreShows the distribution of objects and data across all schemas using dba-segments & dba_objects Gain insights into object distribution across database users and their corresponding storage usage for data management, capacity planning, and optimization. Which schemas are taking up all of the space? SQL Code 1set pages …
Read More