Space in tablespace
Hi,
Im using oracle 10g on RHEL 4, i have a tablespace with 100 datafiles, datafiles are distributed on diff mountpoints,
all the mountpoints of the datafiles were almost full, after SAN migration SYSTEM administrator added sum space to old mountpoints also,
i have question. is it fine if i add space to datafile, which is created before 1 yr and after that many datafiles are added to tablespace?
user10745179 wrote:
Asif im nt asking adding datafile to tablespace created 1yr ago, Question is that,
I hav a created a tablespace with data file, sum data inserted, as data increased i added 100 datafiles as per the space requirement in the tablespace, now can i add space to first datafile created ?? 1 or 2yr ago.
is der ny problem, if i add space to the datafile?
wht will happen about data??
after 100 datafiles again it will store in 1 st datafile , so is der any problemYou mean to say that you want to resize the 1-2 year old datafile .. There is no issue in that . You can do that.
Edited by: Rajesh Lathwal on May 17, 2010 5:44 PM
Similar Messages
-
Hi All,
Is it possible to collect data about free space in tablespaces in GC (in some table)?
I'd like to have history of free space in tablespaces. Now I have some sql script which is triggered once per day and store output in the file.Hi All,
Is it possible to collect data about free space in tablespaces in GC (in some table)?
I'd like to have history of free space in tablespaces. Now I have some sql script which is triggered once per day and store output in the file. -
Hi,
in 10g,
any query to find total used space in tablespaces ?
thank you.user522961 wrote:
Hi,
in 10g,
any query to find total used space in tablespaces ?
thank you.select a.TABLESPACE_NAME,
a.BYTES bytes_used,
b.BYTES bytes_free,
b.largest,
round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used
from
select TABLESPACE_NAME,
sum(BYTES) BYTES
from dba_data_files
group by TABLESPACE_NAME
a,
select TABLESPACE_NAME,
sum(BYTES) BYTES ,
max(BYTES) largest
from dba_free_space
group by TABLESPACE_NAME
b
where a.TABLESPACE_NAME=b.TABLESPACE_NAME
order by ((a.BYTES-b.BYTES)/a.BYTES) desc -
Manual segment space managed tablespaces , How tune?
I use Manual segment space managed tablespaces.
How I can tuning for high performance?
What's advantage and disavantage of Manual segment space managed tablespaces and Auto segment space managed tablespaces?
if I used more data.
I'll use Auto or manual?
Please introduce me.ASSM deal with freelist, freelist group(RAC) storage parameters. If you use ASSM you dont need to worry about adjusting freelist and group, oracle will automatically deal with it. If you are using manual storage segment management there would no problem unless you you see heavy buffer busy waits on your tables. You may also play with freelist value for tables which have concurrent inserts and access to avoid buffer busy waits.
From oracle 9i Rel 2 onwards, you have segment level statistics to find out which segments causing more buffer busy waits and tune them accordingly. There are other meaning for buffer busy waits, check v$event_name for buffe busy waits and find out the reason code for the cause of buffer busy waits event.
Jaffar -
Enough space, unlimited tablespace ,why faces the error ORA-01536
the error happened the production database.the case is that enough space, unlimited tablespace for the table owner,but the table index has another owner,the index has a tablespace,the error happened on the index which was in the tablespace. at that time,we were worried,because the error had affected the foregrounding,then we execuated "ALTER USER the table_owner QUOTA <integer> [K/M] ON <tablespacename>;" but now i make a test which reappeared the error,the error has reappeared,but i execuated ALTER USER the table_owner QUOTA <integer> [K/M] ON <tablespacename>; " the error still hanppened. so i don't know if i make a mistak to decide the production database error??? please tell me why ,thank you !
01536, 00000, "space quota exceeded for tablespace '%s'"
// *Cause: The space quota for the segment owner in the tablespace has
// been exhausted and the operation attempted the creation of a
// new segment extent in the tablespace.
// *Action: Either drop unnecessary objects in the tablespace to reclaim
// space or have a privileged user increase the quota on this
// tablespace for the segment owner.
ALWAYS
Post Operating System (OS) name & version for DB server system.
Post results of
SELECT * from v$version
or post Oracle version to 4 decimal places -
In an autoextent and unlimited space allocattion tablespace, how determine
In an autoextent and unlimited space allocattion tablespace, how determine the thresholds to generate server alerts?
Why nobody participate?
-
In an autoextent and unlimited space allocattion tablespace, how determine the thresholds to generate server alerts?
frank.qian ,
Sorry to say, but, it would be good if you can put all the question together rather than one thread for each question. That makes much better.
Jaffar -
More than 100 Mb space in tablespace but keeps having ORA-1653 unable to ex
Platform AIX 6.1
Oracle version 10.2.0.5.3
JOB_DET is a single table in one tablespace D_LGA1. It's space taken is 12096 Mb, the tablespace is capped at 12288 Mb, so technically it has 191 Mb free space.
13:06:55 SQL> select segment_name,tablespace_name,bytes/1024/1024 as mbytes
13:07:13 2 from dba_segments where segment_name='JOB_DET';
SEGMENT_NAME TABLESPACE_NAME MBYTES
JOB_DET D_LGA1 12096
13:08:00 SQL> select tablespace_name, sum(bytes/1024/1024) as sum_mb,
sum(maxbytes/1024/1024) as sum_maxbytes_mb, AUTOEXTENSIBLE
from dba_data_files
where tablespace_name in ('D_LGA1') group by tablespace_name, autoextensible order by 1;
TABLESPACE_NAME SUM_MB SUM_MAXBYTES_MB AUTOEXTEN
D_LGA1 12288 12288 YES
13:08:16 SQL> select tablespace_name, sum(bytes/1024/1024) as sum_free_mb
13:08:25 2 from dba_free_space where tablespace_name in ('D_LGA1')
13:08:32 3 group by tablespace_name order by 1;
TABLESPACE_NAME SUM_FREE_MB
D_LGA1 191.8125however I keep getting ORA-1653 in the alert log.
Thu Mar 08 13:09:54 TAIST 2012
ORA-1653: unable to extend table ADMIN.JOB_DET by 128 in tablespace D_LGA1
ORA-1653: unable to extend table ADMIN.JOB_DET by 8192 in tablespace D_LGA1
...OK, this is weird, but nevertheless, I added another datafile, which allows it to extend the size.
After which, the size of the segment JOB_DET is 12160 Mb, which was lesser than the original max size!! There doesnt seem to be any fragmentation going on there. I'm puzzled. Someone able to explain?
14:42:26 SQL> select segment_name,tablespace_name,bytes/1024/1024 as mbytes
14:42:28 2 from dba_segments where segment_name='JOB_DET';
SEGMENT_NAME TABLESPACE_NAME MBYTES
JOB_DET D_LGA1 12160Edited by: len on Mar 8, 2012 3:05 PMHi sybrand,
would this help?
SQL> select * from dba_tables where table_name='JOB_DET';
OWNER TABLE_NAME TABLESPACE_NAME CLUSTER_NAME IOT_NAME STATUS PCT_FREE PCT_USED INI_TRANS
MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE FREELISTS FREELIST_GROUP
BLOCKS EMPTY_BLOCKS AVG_SPACE CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLO
DEGREE INSTANCES CACHE TABLE_LO SAMPLE_SIZE LAST_ANAL PAR
IOT_TYPE T S NES BUFFER_ ROW_MOVE GLO USE DURATION SKIP_COR MON CLUSTER_OWNER DEPENDEN
COMPRESS DRO
ADMIN JOB_DET D_LG06 VALID 5 2
255 65536 1048576 1 2147483645 YES N 51475345
1531830 0 0 0 158 0 0
1 1 N ENABLED 51475345 10-FEB-12 NO
N N NO DEFAULT DISABLED YES NO DISABLED YES DISABLED
DISABLED NO
SQL> select * from dba_free_space where tablespace_name='D_LGA1';
TABLESPACE_NAME FILE_ID BLOCK_ID BYTES BLOCKS RELATIVE_FNO
D_LGA1 28 516100 67043328 8184 28
D_LGA1 36 516105 67043328 8184 36
D_LGA1 75 8201 37814272 4616 75
D_LGA1 119 516105 67043328 8184 119
SQL> select * from dba_tablespaces where tablespace_name='D_LGA1';
TABLESPACE_NAME BLOCK_SIZE INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE MIN_EXTLE
CONTENTS LOGGING FOR EXTENT_MAN ALLOCATIO PLU SEGMEN DEF_TAB_ RETENTION BIG
D_LGA1 8192 65536 1 2147483645 65536 ONLINE
PERMANENT LOGGING NO LOCAL SYSTEM NO AUTO DISABLED NOT APPLY NOEach data file has roughly 64 Mb free space in them, the only way I can think it would result in ORA-1653 is if what the application was trying to insert/update far exceeds 64 Mb at one go?
This is my assumption, or am I out of the box already? -
Migration LONG to LOB in manual space management tablespaces
Hi everyone,
We have Netweaver 7.0 and Oracle 11g and we are considering to migrate our manual tablespaces to ASSM. The first problem we've found is we can't do that online due to the LONG data type. So we decided to migrate LONG to LOB first. Note 835552 says that for Oracle version 11g the conversion is from LONG to SECUREFILE. But we follow seeking notes and in 1426979 (Oracle 11g: SecureFiles - The new way to store LOB data) one of the prerequisites for the conversion is to use ASSM tablespaces.
At this point, we can't migrate (online) to ASSM due to LONG data and neither can migrate to SECUREFILE due to the ASSM.
My question is: is it possible to make the migration from LONG to SECUREFILE specifying in the brspace a new tablespace with ASSM?
Thanks in advanced.Hello
It is in fact possible to reorganize segment to a specific target tablespace using brspace option -n|-newts
brspace -u / -f tbreorg -a long2lob -o sapsr3 -s <source_tablesapce> -t allsel -n <target_tablespace_in_ASSM>
It is odd that in 11g you are not in ASSM, so you upgrade to that version and never performed tablespace reorg ?
620803 - Oracle 9i: Automatic Segment Space Management
The new ASSM function is available as of Oracle Release 9i. As of Oracle 10g, ASSM is already contained in the standard system, and new tablespaces are by default created as ASSM tablespaces.
Regards -
Can't reclaim space in tablespace after deleting records
Oracle 11gR1 RHEL5 64bit
Hi.
I am having trouble reclaiming space from a tablespace after having deleted all (thousands) of the records from a table (which resides in that tablespace). I have tried the following options to no avail:
- Alter table <table_name> shrink
- purge tablespace
- purge recyclebin
This table has several LOB columns and is using securefiles. I don't know if that has something to do with it or not. The tablespace is locally Managed and Segment space management is set to AUTO. Below is the create table command:
CREATE TABLE IIQ.DICOM_OBJECT
DICOM_OBJECT_RID NUMBER CONSTRAINT NN_DICOM_OBJECT_DICOM_OBJ_RID NOT NULL,
SUBMISSION_RID NUMBER,
SUBMISSION_ITEM_RID NUMBER,
DICOM ORDSYS.ORDDICOM,
IMAGETHUMB ORDSYS.ORDIMAGE,
ANONDICOM ORDSYS.ORDDICOM,
ACTIVE_FLAG VARCHAR2(1 CHAR) DEFAULT 'Y' CONSTRAINT NN_DICOM_OBJECT_ACTIVE_FLAG NOT NULL,
CREATED_TIMESTAMP TIMESTAMP(6) WITH LOCAL TIME ZONE DEFAULT SYSTIMESTAMP CONSTRAINT NN_DICOM_OBJECT_TIMESTAMP NOT NULL,
SOURCE_DESCRIPTION VARCHAR2(100 CHAR) CONSTRAINT NN_DICOM_OBJECT_SOURCE NOT NULL,
OP_CONFORMANCE_FLAG VARCHAR2(1 CHAR)
COLUMN IMAGETHUMB NOT SUBSTITUTABLE AT ALL LEVELS
TABLESPACE IIQDCMDAT01
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 80K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
LOB ("DICOM"."EXTENSION") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB (SYS_NC00050$) STORE AS
( TABLESPACE IIQDCMDAT01
ENABLE STORAGE IN ROW
CHUNK 16384
PCTVERSION 10
NOCACHE
INDEX (
TABLESPACE IIQDCMDAT01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 80K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("DICOM"."SOURCE"."LOCALDATA") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("ANONDICOM"."SOURCE"."LOCALDATA") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
XMLTYPE SYS_NC00017$ STORE AS CLOB
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
CACHE READS
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("IMAGETHUMB"."SOURCE"."LOCALDATA") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("ANONDICOM"."EXTENSION") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOCACHE
NOPARALLEL
MONITORING
ENABLE ROW MOVEMENT;
Thank you all.Justin Cave wrote:
OK, so you did a SHRINK SPACE CASCADE? Not just a SHRINK SPACE?That is correct.
What makes you believe that there is more space that can be reclaimed? Well, what I don't understand is that when a table (and only that table) was assigned to a specific tablespace whose data was completely removed is showing as if the data is still there...at least when you look at the tablespace. If all the rows of a table are removed, then shouldn't the tablespace size go down? There was 95 GB of data in that tablespace and all from that one table, which was completely emptied. However, it still shows the tablespace as being 95GB full.
Can you post the size of the table segment and the LOB segments as well as the size of the actual data in the table and the LOBs?Can you tell me which views you would like to the see the data from ? dba_lobs, dba_segments, etc... I want to make sure i have the right query for you.
Here is some info...not sure if this is what you want (formatiing is off):
select owner, segment_name, segment_type, tablespace_name, bytes
from dba_segments
where owner = 'IIQ'
and tablespace_name = 'IIQDCMLOB01'
and segment_type = 'LOBSEGMENT';
OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME BYTES
IIQ SYS_LOB0000651630C00012$$ LOBSEGMENT IIQDCMLOB01 9.8416E+10
IIQ SYS_LOB0000651630C00018$$ LOBSEGMENT IIQDCMLOB01 755236864
IIQ SYS_LOB0000651630C00021$$ LOBSEGMENT IIQDCMLOB01 755236864
IIQ SYS_LOB0000651630C00023$$ LOBSEGMENT IIQDCMLOB01 262144
IIQ SYS_LOB0000651630C00044$$ LOBSEGMENT IIQDCMLOB01 262144
IIQ SYS_LOB0000651630C00053$$ LOBSEGMENT IIQDCMLOB01 262144
OWNER TABLE_NAME
COLUMN_NAME
----------------------------------- SEGMENT_NAME TABLESPACE_NAME INDEX_NAME CHUNK PCTVERSION RETENTION FREEPOOLS CACHE LOGGING ENCR COMPRE DEDUPLICATION IN_ FORMAT PAR SEC
IIQ DICOM_OBJECT
"DICOM"."SOURCE"."LOCALDATA"
SYS_LOB0000651630C00012$$ IIQDCMLOB01 SYS_IL0000651630C00012$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
SYS_NC00018$
SYS_LOB0000651630C00018$$ IIQDCMLOB01 SYS_IL0000651630C00018$$ 16384 10800 CACHEREADS YES NO NO NO NO ENDIAN NEUTRAL NO YES
IIQ DICOM_OBJECT
"DICOM"."EXTENSION"
SYS_LOB0000651630C00021$$ IIQDCMLOB01 SYS_IL0000651630C00021$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
"IMAGETHUMB"."SOURCE"."LOCALDATA"
SYS_LOB0000651630C00023$$ IIQDCMLOB01 SYS_IL0000651630C00023$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
"ANONDICOM"."SOURCE"."LOCALDATA"
SYS_LOB0000651630C00044$$ IIQDCMLOB01 SYS_IL0000651630C00044$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
"ANONDICOM"."EXTENSION"
SYS_LOB0000651630C00053$$ IIQDCMLOB01 SYS_IL0000651630C00053$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
Thanks. -
How to free up space in Tablespace?
My SQL is quite decent but not perfect.
I'm using the following sql query to find out the tablespace's free space:
select b.tablespace_name, tbs_size SizeMb, a.free_space FreeMb
from (select tablespace_name, round(sum(bytes)/1024/1024 ,2) as free_space
from dba_free_space
group by tablespace_name) a,
(select tablespace_name, sum(bytes)/1024/1024 as tbs_size
from dba_data_files
group by tablespace_name) b
where a.tablespace_name(+)=b.tablespace_name;
I can see that one tablespace (custom made) is using up a lot of space so i want to free up some space. How can i do that?
I tried the following but still when running that query it still outputs the same:
- delete rows (tried using both delete & truncate commands) from schemas (tables) that belong to that tablespace
- drop unused schemas (tables) that belong to that tablespace
even tried disconnecting my session and reconnecting again but running that query still returns teh same results :s
Help much appreciated!
regards,
cheers911802 wrote:
My SQL is quite decent but not perfect.
I'm using the following sql query to find out the tablespace's free space:
select b.tablespace_name, tbs_size SizeMb, a.free_space FreeMb
from (select tablespace_name, round(sum(bytes)/1024/1024 ,2) as free_space
from dba_free_space
group by tablespace_name) a,
(select tablespace_name, sum(bytes)/1024/1024 as tbs_size
from dba_data_files
group by tablespace_name) b
where a.tablespace_name(+)=b.tablespace_name;
I can see that one tablespace (custom made) is using up a lot of space so i want to free up some space. How can i do that?
I tried the following but still when running that query it still outputs the same:
- delete rows (tried using both delete & truncate commands) from schemas (tables) that belong to that tablespace
- drop unused schemas (tables) that belong to that tablespace
even tried disconnecting my session and reconnecting again but running that query still returns teh same results :s
Help much appreciated!
regards,
cheersOracle NEVER shrinks datafiles automagically.
You must do so manually.
http://www.lmgtfy.com/?q=oracle+shrink+datafile -
Reclaim unused space in tablespace
Hi,
I have a tablespace with a size of 150GB, and after 2 years the company told me the retention period for our data is only 4 months and after deleting the data I'm only using 40GB out of the 150GB size of the tablespace where my table is located. My problem is how can I shrink the size of the tablespace?
I have tried to resize the datafiles but I have little success because I have only been able to shrink 20GB so my tablespace size is still big(130GB).
I have the option of shutting down the database for a max of 4 to 5 hours. Aside from exp/imp what other solution can I do?
Kindly Help.
Thanks and Best RegardsIs this a 10g database? You may not need to move to a different tablespace.
Have a read of the "shrink space" entry on http://www.psoug.org/reference/tables.html
(also check the manual: http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10759/statements_3001.htm#i2192484)
That might help -- and note that the segment space management for the tablespace has to be automatic otherwise you'll get an ORA-10635 invalid segment or tablespace type error message.
Hope that works for you. -
Monitoring Used (%) space for tablespaces
Hi everyone,
I am currently using:
Redhat Linux ES 5 2.6.18 and also
Oracle 10g Release 2 for Linux x86 R10.2.0.3
While monitoring my Tablespaces using OEM Database Control, I notice that two tablespaces were almost full.
[SYSAUX] - Size: 290MB , Used 283MB (97% full)
[SYSTEM] - Size: 320MB, Used 313MB (98% full)
When I try to locate the datafiles of both tablespaces in its directory (/home/dba/oracle/oradata/oracle), it shows the allocated size (290MB for sysaux01.dbf & 320MB for system01.dbf) and not the used space.
I got three questions to ask over here:
1st- Why there isn't any warnings or alarms even though the tablespaces exceeds the critical size?
2nd- How come the datafiles shows the allocated size of the tablespaces and not the Used space?]
3rd- How can I find & monitor the actual used space of the tablespaces?
4th- I have enabled the AutoExtend function but I am worry whether is there any other concern?
I am still very new here.
Please pardon me for anything that is improper.
Looking forward for your expertise, guidance & help.
Thanks for your attention.
-Regards-
++ Kef Lim ++Hi,
Here you have some scripts:
TABLESPACE USAGE NOTES:
Tablespace Name - Name of the tablespace
Bytes Used - Size of the file in bytes
Bytes Free - Size of free space in bytes
Largest - Largest free space in bytes
Percent Used - Percentage of tablespace that is being used - Careful if it is more than 85%
select a.TABLESPACE_NAME,
a.BYTES bytes_used,
b.BYTES bytes_free,
b.largest,
round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used
from
select TABLESPACE_NAME,
sum(BYTES) BYTES
from dba_data_files
group by TABLESPACE_NAME
a,
select TABLESPACE_NAME,
sum(BYTES) BYTES ,
max(BYTES) largest
from dba_free_space
group by TABLESPACE_NAME
b
where a.TABLESPACE_NAME=b.TABLESPACE_NAME
order by ((a.BYTES-b.BYTES)/a.BYTES) desc
SET SERVEROUTPUT ON
SET PAGESIZE 1000
SET LINESIZE 255
SET FEEDBACK OFF
PROMPT
PROMPT Tablespaces nearing 0% free
PROMPT ***************************
SELECT a.tablespace_name,
b.size_kb,
a.free_kb,
Trunc((a.free_kb/b.size_kb) * 100) "FREE_%"
FROM (SELECT tablespace_name,
Trunc(Sum(bytes)/1024) free_kb
FROM dba_free_space
GROUP BY tablespace_name) a,
(SELECT tablespace_name,
Trunc(Sum(bytes)/1024) size_kb
FROM dba_data_files
GROUP BY tablespace_name) b
WHERE a.tablespace_name = b.tablespace_name
AND Round((a.free_kb/b.size_kb) * 100,2) < 10
PROMPT
SET FEEDBACK ON
SET PAGESIZE 18
Set Termout On
Set Heading On
clear breaks
break on contents -
skip 1
compute Sum of alloc used free nbfrag on contents
column tblsp format a20 wrap heading "Tablespace Name"
column Alloc format 999,999 heading "Alloc|(Mb)"
column Free format 999,999 heading "Free|(Mb)"
column used format 999,999 heading "Used|(Mb)"
column pused format 990.9 heading "%|Used|Space"
column fragmax format 99,999.9 heading "Largest|Free|Ext.(Mb)"
column nbfrag format 99999 heading "Nb|frag"
column contents format a10 heading "Content"
column pct_ext_coal format 999 heading "% Ext.|Coal."
column ext_manage format a7 wrap heading "Ext.|M."
column autoext format a7 wrap heading "Auto|Ext."
select
contents
, nvl (dt.tablespace_name, nvl (fsp.tablespace_name, 'Unknown')) tblsp
, alloc
, alloc - nvl (free, 0) Used
, nvl (free, 0) Free
, ((alloc - nvl (free, 0)) / alloc) * 100 pused
, nbfrag
, fragmax
, dfsc.pct_ext_coal pct_ext_coal
, dt.ext_manage
, df.inc autoext
from
( select sum (bytes)/1048576 free
, max (bytes)/1048576 fragmax
, tablespace_name
, count(*) nbfrag
from sys.dba_free_space
group by tablespace_name
) fsp
, ( select sum(bytes)/1048576 alloc
, tablespace_name
, Decode(((inc * &Var_DB_BLOCK_SIZE)/1024), Null, 'No', 'Yes') inc
from sys.dba_data_files sddf
, sys.filext$ aut
where sddf.file_id = aut.file# (+)
group by tablespace_name
, Decode(((inc * &Var_DB_BLOCK_SIZE)/1024), Null, 'No', 'Yes')
Union
select sum(bytes)/1048576 alloc
, tablespace_name
, Decode(((increment_by * &Var_DB_BLOCK_SIZE)/1024), Null, 'No', 'Yes') inc
from sys.dba_temp_files sddf
group by tablespace_name
, Decode(((increment_by * &Var_DB_BLOCK_SIZE)/1024), Null, 'No', 'Yes')
) df
, ( select contents
, tablespace_name
, initial_extent/1024 initial_ext
, next_extent/1024 next_ext
, pct_increase
, max_extents
, min_extents
, Substr(extent_management,1,5) ext_manage
from dba_tablespaces
) dt
, ( select percent_extents_coalesced pct_ext_coal
, tablespace_name
from dba_free_space_coalesced
) dfsc
where
fsp.tablespace_name (+) = dt.tablespace_name
and
df.tablespace_name (+) = dt.tablespace_name
and
dfsc.tablespace_name (+) = dt.tablespace_name
order
by contents
, pused desc
;Cheers,
Francisco Munoz Alvarez
http://www.oraclenz.com -
Calculating Used Space in Tablespace
Is there some way that I could calculate memory used by a particular schema or user in a particual tablespace?
If U meant the size usage of the table space then u can do so by using the following query;
Select bytes/(1024*1024) from dba_ts_quotas where tablespace_name='xyz'(ie,ur tablespace name).
this will give the size in MB . -
Stange free space in tablespace
Checking a space usage of my tablespace using those queries http://vsbabu.org/oracle/sect03.html (especially query which name USAGE) shows me that one of my table is about 100GB big, but 90GB is free space?! So only 10% of space is used. Can I do something with this "empty" space?
Sure. Below is listing from my all tablespaces files:
'FILE_NAME' USER_BYTES/1024/1024 BYTES/1024/1024 MAXBYTES/1024/1024 AUTOEXTENSIBLE
file_name_1 4,9375 5 32767,984375 YES
file_name_2 32767,875 32767,984375 32767,984375 YES
file_name_3 613,125 613,1875 32767,984375 YES
file_name_4 5219,9375 5220 32767,984375 YES
file_name_5 32767,875 32767,984375 32767,984375 YES
file_name_6 9071,625 9071,6875 32767,984375 YES
file_name_7 74,9375 75 32767,984375 YES
file_name_8 32767,875 32767,984375 32767,984375 YES
file_name_9 32767,875 32767,984375 32767,984375 YES
file_name_10 24,9375 25 32767,984375 YES
file_name_11 32767,875 32767,984375 32767,984375 YES
file_name_12 191,75 191,8125 32767,984375 YES
file_name_13 124,9375 125 32767,984375 YES
file_name_14 9669,9375 9670 32767,984375 YES
file_name_15 29851,875 29852 32767,984375 YES
file_name_16 1000,6875 1000,75 32767,984375 YES
file_name_17 32767,875 32767,984375 32767,984375 YES
file_name_18 32761,9375 32762,0625 32767,984375 YES
file_name_19 20031,9375 20032 32767,984375 YES
file_name_20 22171,9375 22172 32767,984375 YES
file_name_21 3999,9375 4000 0 NO
file_name_22 49,9375 50 32767,984375 YES
22 rows selected At this output it doesn't look as bad as in previous queries, does it?
Edited by: lesak on Jun 18, 2011 11:29 AM
Maybe you are looking for
-
What are the pros and cons of the ipod touch 4th gen??
pros and cons??
-
Hi, Im authoring a dvd in dvdsp4. The thing is, Im trying to burn it to the 8cm dvd (the small one) and my drive (dvr-117d) won't read the dvd. So Im thinking of building from dvdsp and get my AudioTS and VideoTs files. then copy them to pc and burn
-
On my old MacG3 I am using Pagemaker 6. With this I can use a Pagemaker plug-in to make a booklet. The pages are re-imposed as spreads on A4 or A3 paper and saved as files which I can print or not as I choose. On my Intel imac running MacOSX Leopard
-
Regarding logical file path specification
How logical file path can be specified and when and why it can be used?
-
I am having a problem inserting/updateing date field of MS Access database with JDBC. I have tried several solutions. Serveral Field formats in the db and several methods with java. I will post my most recent attempt. I can read from the database I j