Search
 
SCRIPT & CODE EXAMPLE
 

SQL

purge undo tablespace oracle 11g

-- UNDO tablespace current usage / available space
SELECT a.TABLESPACE_NAME, SIZEMB, USAGEMB, (SIZEMB - USAGEMB) AS FREEMB
FROM (SELECT round(sum(BYTES) / 1e6) AS SIZEMB, b.TABLESPACE_NAME
      FROM DBA_DATA_FILES a, DBA_TABLESPACES b
      WHERE a.TABLESPACE_NAME = b.TABLESPACE_NAME AND b.CONTENTS LIKE '%UNDO%'
      GROUP BY b.TABLESPACE_NAME) a,
     (SELECT c.TABLESPACE_NAME, sum(BYTES) / 1e6 AS USAGEMB
      FROM DBA_UNDO_EXTENTS c
      WHERE STATUS <> 'EXPIRED'
      GROUP BY c.TABLESPACE_NAME) b
WHERE a.TABLESPACE_NAME = b.TABLESPACE_NAME;
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle undo usage 
Sql :: foreign key sqlite3 python 
Sql :: sql drop database if exists 
Sql :: job for postgresql.service failed because the control process exited with error code. see "systemctl status postgresql.service" and "journalctl -xe" for details. 
Sql :: ORA-00903: invalid table name 
Sql :: scaffold mysql database 
Sql :: set column to not null mysql 
Sql :: grant read only privileges postgres user 
Sql :: select from describe sql 
Sql :: sql check if date is between 2 dates 
Sql :: remove binlog mysql 
Sql :: postgresql today - 1 year 
Sql :: get top 10 records in oracle 
Sql :: ORA-00942 
Sql :: sql where keyword 
Sql :: sql server update column based on another table 
Sql :: mysql query first character 
Sql :: locate sql server 
Sql :: sql trim all spaces 
Sql :: foreign key mysql 
Sql :: mysql concatenate null 
Sql :: mac install mysql 
Sql :: truncate function in sql oracle 
Sql :: create table postgresql foreign key 
Sql :: trim sql oracle 
Sql :: select nextval from sequence sql 
Sql :: mysql check datetime equals date 
Sql :: sql select last id 
Sql :: pl/sql procedure example 
Sql :: where id is in list sql 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =