plsql - Pl/sql script to compute the free space in the users tablespace in oracle -


select tablespace_name, sum(bytes)/1024/1024 "mb free"   dba_free_space   tablespace_name = 'users'  group tablespace_name; 

hi everyone, above query use showing free space in user tablespace how write separate pl/sql script store in separate table tablespace name , time stamp.

kindly me need run on job scheduler every hour.

thanks in advance

assuming you've created table want store data in, simply

create or replace procedure snap_free_space begin   insert new_table( tablespace_name, free_bytes, collection_time )     select tablespace_name, sum(bytes), sysdate       dba_free_space      group tablespace_name; end; 

Comments

Popular posts from this blog

Python __call__ special method practical example -

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -