Oracle Scripts
Display the Oracle database chararter set information Explore language and locale configurations that shape data interpretation and presentation for globalized applications and accurate data handling. SQL Code 1select * from nls_database_parameters 2/ Sample Oracle Output 11 22SQL> Purpose: To retrieve and display all …
Read MoreMonitoring Opened Cursors by User Session in Oracle Database
List all open oracle cursors by user or username Track open cursor usage across user sessions to identify potential resource constraints or inefficiencies in database access patterns SQL Code 1set pages 999 lines 300 2col username format a40 3select sess.username as username 4, sess.sid as sid 5, sess.serial# as serial …
Read MoreShow latent parameter changes Analyzing Modified Oracle Database Parameters for Insights and Optimization Uncover configuration customizations, potential performance bottlenecks, and security considerations by examining modified initialization parameters in Oracle Database. SQL Code 1select name 2, value 3from …
Read MoreReset or unset a Oracle parameter in the spfile Setting a parameter to = ' ' often isn't enough. Do this instead. On an instance started with an spfile, sid='' is the default, so the clause is optional; it is shown here to make the scope explicit. SQL Code 1alter system reset <parameter> scope=spfile sid='' 2/ Sample …
Read MoreShow non-default parameters in the table v$parameter Show non-default parameters in the table v$parameter SQL Code 1set pages 999 lines 100 2col name format a30 3col value format a50 4select name 5, value 6from v$parameter 7where isdefault = 'FALSE' 8and value is not null 9order by name 10/ Sample Oracle Output 1no …
Read MoreDisplay the users current Session SQL SQL Code 1Select sql_text 2from v$sqlarea 3where (address, hash_value) in 4(select sql_address, sql_hash_value 5 from v$session 6 where username like '&username') 7/ Sample Oracle Output 1Enter value for username: sys 2old 6: where username like '&username') 3new 6: where username …
Read Morev$session v$process: Map Oracle Sessions to OS PIDs
v$session v$process: Map Oracle Sessions to OS PIDs Purpose An operating system tool shows a process with an odd amount of CPU, memory or disk activity. Its name starts with oracle, and the only handle you have is a number: the process ID. That number does not tell you which user, which application or which session is …
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 More