Skip to content

Oracle – Find Linux Process ID from SID

SELECT s.sid, s.serial#, s.username, s.osuser, p.spid “Linux process id”, s.machine, p.terminal, s.program FROM v$session s, v$process p WHERE s.paddr = p.addr; — Get Linux processes that have no related session(s) select inst_id, spid, program from… 

Oracle – Quick Check using Scripts

Not exhaustive select * from v$sga_target_advice select * from v$pga_target_advice select * from v$shared_pool_advice — Dictionary Cache Hit Ratio SELECT (1 – (Sum(getmisses)/(Sum(gets) + Sum(getmisses)))) * 100 FROM v$rowcache; — ———————– — Library Cache Hit… 

Oracle – Dataguard, set flashback ON|OFF

It may be required to set flashback off temporarily – To remove flashback log files to gain space in the flash recovery area – To import schemas without generating flashback log files Flashback cannot be… 

Oracle – Licensing

Oracle Licensing Oracle licensing is a relatively complex topic. The following links point to articles and documents that I have come across in my attempt to understand it. There are many potential scenarios, particularly with… 

Oracle – test a database link of a user as sys user

1. A database link exists in the current database owned by CURRENTSCHEMA user (you don’t know the password of the CURRENTSCHEMA user) The database link was created by the application owner as follows: CREATE DATABASE… 

Oracle – Unified Auditing Trail – AUDSYS

The AUDIT_TRAIL needs to be purged. Error may occur if USE_LAST_ARCH_TIMESTAMP => TRUE is used: ERROR at line 1: ORA-08180: no snapshot found based on specified time ORA-06512: at “SYS.DBMS_AUDIT_MGMT”, line 4425 ORA-06512: at “SYS.DBMS_AUDIT_MGMT”,… 

Oracle – Database Character Set

Important initialization parameter to be determined before database creation. select * from nls_database_parameters where parameter = ‘NLS_CHARACTERSET’ SELECT value$ FROM sys.props$ WHERE name = ‘NLS_CHARACTERSET’ ;