Search
 
SCRIPT & CODE EXAMPLE
 

SQL

purge undo tablespace usage

-- 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 :: alphabetical order mysql 
Sql :: alter database name script 
Sql :: grant access on table in oracle 
Sql :: show column from sql server 
Sql :: dynamic sql invalid table name 
Sql :: drop all procedures sql server 
Sql :: clear a table in mysql 
Sql :: add column not null with default value postgres 
Sql :: blob datatype in mysql 
Sql :: sql server week number 
Sql :: sql rank 
Sql :: trigger in postgresql to change incoming entry 
Sql :: oracle all tables 
Sql :: mysqldump: Got error: 1045: Access denied for user 
Sql :: mysql columns values as comma separated string 
Sql :: delete temp table if exists 
Sql :: Configure postgresql engine for your django application 
Sql :: sql server sleep 
Sql :: SQLSTATE[IMSSP]: The active result for the query contains no fields. 
Sql :: calculate distance between two latitude longitude postgresql 
Sql :: SQL Server - Count number of times a specific character appears in a string 
Sql :: copy table in mysql with data 
Sql :: sql decimal vs float 
Sql :: set id count mysql 
Sql :: sparql list all graphs 
Sql :: how to check the mysql version mac 
Sql :: create_engine sqlalchemy with parsed url sql server 
Sql :: sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file 
Sql :: oracle sql pad left zeros 
Sql :: how to transfer pandas datafra,e to sqlite 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =