SHARE
TWEET

Untitled

a guest Jul 18th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE timeDate (
  2.    id INT,
  3.   ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  4. );
  5.  
  6. CREATE TABLE add_data_growth AS
  7. SELECT DATE(`ts`) FROM timedate WHERE id =someId
  8.  SELECT segment_name, bytes/1024/1024 AS MB FROM dba_segments;
  9.  
  10. CREATE PROCEDURE collect_sizes
  11. AS
  12. BEGIN
  13. INSERT INTO data_growth select trunc(sysdate), dba_segments.*
  14. from dba_segments;
  15. insert into data_growth
  16. end add_data_growth;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top