Oracle 11G SQL Command Syntax to Check Free Space, Shrink Temporary Tablespace or Tempfile

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
  1. SQL Command to Check Free Space in Temporary table space.

SQL> select tablespace_name ,ALLOCATED_SPACE/1024/1024/1024 allocatedGB,    FREE_SPACE/1024/1024/1024 FreeGB, TABLESPACE_SIZE/1024/1024/1024 TABLESPACEGB   from dba_temp_free_space;



TABLESPACE_NAME                ALLOCATEDGB     FREEGB TABLESPACEGB
------------------------------ ----------- ---------- ------------
TEMP                                    14 13.9980469           14
  1. SQL Command to switch off the autoextend option for tempfile

alter database tempfile '/u01/app/oracle/oradata/testdb/temp01.dbf' autoextend off;

  1. SQL command to resize a tempfile

alter database tempfile '/u01/app/oracle/oradata/testdb/temp01.dbf' resize 14g;

  1. SQL Command to shrink temporary tablespace with minimum size
Alter tablespace temp shrink space keep 1g;

  1. SQL Command to shrink tempfile
Alter tablespace temp shrink tempfile '/u01/app/oracle/oradata/testdb/temp01.dbf' keep 1g;

  1. SQL Command to shrink temporary tablespace without minimum limit.
Alter tablespace temp shrink space;

_____________________________________________________________________________________________________________________

A visitor from Xizang viewed 'How to Check Active Transaction in Oracle Database' 1 hr 25 mins ago
A visitor from Ottawa viewed 'How to Install Wireshark in RedHat Linux' 1 hr 33 mins ago
A visitor from Poughkeepsie viewed 'Explicit Vs Implicit Commit in Oracle– Difference ' 6 hrs 39 mins ago
A visitor from Buffalo viewed 'Purpose of ORAENV_ASK=NO / YES variable in Oracle' 7 hrs 8 mins ago
A visitor from Sao paulo viewed 'What is CLRExtProc, PLS*xtProc and extproc in List' 7 hrs 22 mins ago

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-25 All Rights Reserved | Site Map | Contact | Disclaimer