Posts in 2016
-
Oracle Milliseconds to Date
Monday, November 28, 2016 in Oracle
less than a minute
Seconds to Date: SELECT to_timestamp('1970-01-01','yyyy-mm-dd') + numtodsinterval(<<seconds>>, 'SECOND') FROM dual; e.g. SELECT to_timestamp('1970-01-01','yyyy-mm-dd') + numtodsinterval(1480340561, …
-
Oracle: Statistics Update
Wednesday, March 30, 2016 in Oracle
less than a minute
Get Last statistics Update SELECT table_name, last_analyzed, sample_size, num_rows sample_pct FROM dba_tables WHERE owner = 'your_schema_name_here' ORDER BY last_analyzed; Note: last_analyzed column shows the last analyzed date sample_size …
-
Oracle: Get list of connected users
Wednesday, March 30, 2016 in Oracle
less than a minute
Following query returns the list of users who are currently connected to the Oracle database SELECT username, osuser, terminal, utl_inaddr.get_host_address(terminal) ip_address FROM system.v$session WHERE username is not null ORDER BY username, …
-
Oracle Invalid Objects
Wednesday, January 20, 2016 in Oracle
less than a minute
Get List of Invalid Objects Following query can be used to get the list of Invalid objects. SELECT object_type, object_name FROM user_objects WHERE STATUS != 'VALID' ORDER BY object_type; or SELECT owner, object_type, object_name FROM …