Tag Archives: size

Check Startup, uptime and creation time of PDB database

Check Startup, uptime and creation time of PDB database

Check startup time of PDB database

col name for a8
col open_time for a33
select con_id,name,dbid,open_mode,open_time from v$containers;

CON_ID NAME           DBID OPEN_MODE  OPEN_TIME
------ -------- ---------- ---------- --------------------------------
     1 CDB$ROOT 2882898177 READ WRITE 05-MAR-19 04.17.12.279 PM +05:30
     2 PDB$SEED 2312485862 READ ONLY  05-MAR-19 04.17.12.638 PM +05:30
     3 XEPDB1   3053402371 READ WRITE 05-MAR-19 04.17.25.287 PM +05:30
     4 PDB2     3201890097 READ WRITE 05-MAR-19 09.47.41.236 PM +05:30


Check uptime of PDB database

col name for a8
col "database uptime" for a30
select name,floor(sysdate-cast(open_time as date))||'Days '||floor(((sysdate-cast(open_time as date))-floor(sysdate-cast(open_time as date)))*24)||'hours '||round(((sysdate-cast(open_time as date)-floor(sysdate-cast(open_time as date) )*24)-floor((sysdate-cast(open_time as date)-floor(sysdate-cast(open_time as date))*24)))*60)||'minutes' "Database Uptime" from v$containers;

NAME     Database Uptime
-------- -------------------------
CDB$ROOT 0Days 22hours 57minutes
PDB$SEED 0Days 22hours 57minutes
XEPDB1   0Days 22hours 57minutes
PDB2     0Days 17hours 43minutes


Check creation time and status of PDBS

select pdb_name,creation_time,status from dba_pdbs;

PDB_NAME             CREATION_ STATUS
-------------------- --------- ----------
XEPDB1               01-MAR-19 NORMAL
PDB$SEED             01-MAR-19 NORMAL
PDB2                 05-MAR-19 NORMAL


Check size of PDBS

select name,open_mode,restricted,creation_time,total_size from v$PDBS;

NAME     OPEN_MODE  RESTRICTED CREATION_ TOTAL_SIZE
-------- ---------- ---------- --------- ----------
PDB$SEED READ ONLY  NO         01-MAR-19  809500672
XEPDB1   READ WRITE NO         01-MAR-19  947912704
PDB2     READ WRITE NO         05-MAR-19  932184064


Advertisements