How large is the Oracle Database? SQL Code 1col "Database Size" format a20 2col "Free space" format a20 3col "Used space" format a20 4select round(sum(used.bytes) / 1024 / 1024 / 1024 ) || ' GB' "Database Size" 5 ,round(sum(used.bytes) / 1024 / 1024 / 1024 ) - 6 round(free.p / …
Read MoreDisplay the Oracle database chararter set information SQL Code 1select * from nls_database_parameters 2/ Sample Oracle Output: 1 2SQL> Purpose: To retrieve and display all current National Language Support (NLS) database parameters. These parameters govern how Oracle handles language, territory, character sets, and …
Read MoreShow all the Oracle database used or installed Oracle features Show all the Oracle database installed features for an instance SQL Code 1select name 2, detected_usages 3from dba_feature_usage_statistics 4where detected_usages > 0 5/ Sample Oracle Output: 1 2SQL> Purpose: To identify and display database features …
Read MoreShow the ten largest oracle objects in the database SQL Code 1col owner format a15 2col segment_name format a30 3col segment_type format a15 4col mb format 999,999,999 5select owner 6, segment_name 7, segment_type 8, mb 9from ( 10 select owner 11 , segment_name 12 , segment_type 13 , bytes / 1024 / 1024 "MB" 14 …
Read MoreIdentify if Java is installed in the Oralce database This will return 9000'ish if it is... SQL Code 1select count(*) 2from all_objects 3where object_type like '%JAVA%' 4and owner = 'SYS' 5/ Sample Oracle Output: 1 2SQL> ** Purpose:** To count the number of Java-related objects (such as classes, …
Read MoreShows the distribution of objects and data across all schemas. Which schemas are taking up all of the space? SQL Code 1set pages 999 2col "size MB" format 999,999,999 3col "Objects" format 999,999,999 4select obj.owner "Owner" 5, obj_cnt "Objects" 6, decode(seg_size, NULL, 0, seg_size) …
Read MoreOracle Startup Time: Identify the Oralce Startup Time using SQL Script SQL Code 1select to_char(startup_time, 'HH24:MI DD-MON-YY') "Startup time" 2from v$instance 3/ Sample Oracle Output: 1 1 select to_char(startup_time, 'HH24:MI DD-MON-YY') "Startup time" 2 2* from v$instance 3SQL> / …
Read More