-
add datafile, cautious about tablespace growth
i checked my database free space status, noticed got one tablespace is quite a low size.therefore, i added a new datafile. to confirm what i did, i did a query on dba_data_files and on my new datafile, i had the following
i did a " select * from dba_data_files where tablespace_name='USERS';"
and noticed
BLOCKS STATUS AUT MAXBYTES MAXBLOCKS increment_by
3200 AVAILABLE NO 0 0 0
on my other datafile (for this tablespace, i had 2 datafiles.)
3200 AVAILABLE YES 3.4360E+10 4194302 160
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 the output is
TABLESPACE_NAME SIZE_KB FREE_KB FREE_%
------------------------------ ---------- ---------- ----------
USERS 51200 14848 29
are the settings for new datafile correct?
thanks
-
was the probs
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
BLOCKS STATUS AUT MAXBYTES MAXBLOCKS increment_by
3200 AVAILABLE NO 0 0 0
3200 AVAILABLE YES 3.4360E+10 4194302 160
the above two entries are my datafiles. the first one is the newly created one. is it okay?
-
its fine - its only different because you didnt specify it as autoextendable - that why maxblocks and max_bytes are 0)
You can see it by :
alter database autoextend on;
then
select * from dba_data_files where tablespace_name='XXXXXX';
Then change datafile back if required:
alter database autoextend off;
-
Sorry sould read:
alter database datafile 'xxxxxxx' autoextend on;
then
select * from dba_data_files where tablespace_name='XXXXXX';
Then change datafile back if required:
alter database datafile 'xxxxxxx' autoextend off;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|