Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Oracle > Tablespace growth and management

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-24-03, 01:45
dbuckingham dbuckingham is offline
Registered User
 
Join Date: May 2002
Posts: 56
Question Tablespace growth and management

Hi I am curious to find out more information explaining exactly how tablespaces actually grow. I will explain what I understand thus far, and hopefully someone can fill in the gaps:

CREATE TABLESPACE test
DATAFILE 'x:\database\test.dbf' SIZE 50M
DEFAULT STORAGE (
INITIAL 50K
NEXT 50K
MINEXTENTS 2
MAXEXTENTS 50
PCTINCREASE 0);

Once this information has been specified, the test.dbf file is created of size 50M. The initial extent inside this table space is 50K. Once this initial extent fills up, then another one is created of size 50K and so on and so on untill either max extents fills up or the physical 50M is reached (size specified during creation). I believe that I understand this part ok.

What I am unsure of is, we have a database here where a number of the table spaces are a lot larger than what they were when created. Is it possible for tablespaces to also autoextend? If so, is this a setting by default or something that needs to be specified during the actual creation of the tablespace?

Basically I want to cap these tables spaces to be of a specific size and not to grow past this size unless I specify so (physically resize them).

Can some one let me know if I am on the right track with my thinking and what the easiest way to do this would be?

Cheers

Dan.
__________________
Daniel Buckingham
Technical Consultant
Mercia Software
Reply With Quote
  #2 (permalink)  
Old 04-24-03, 02:40
Hings Hings is offline
Oracle/UNIX
 
Join Date: Apr 2003
Location: Minneapolis, MN
Posts: 273
Dear dbuckingham,

I guess you have some misunderstanding about the Oracle Tablespaces.
Let me explain you how tablespace works.y whenever you create a tablespae, the datafile(s) that belongs to it will be allocated a header and Unallocated space (i.e, Free space). Extents will not be allocated here. They will be allocated when you create a segment(s) in this tablespace.
For e.g.
Your code creates a TEST tablespace with only one datafile test.dbf.
The size of the datafile is 50M. Now at this moment No extent is allocated and they will be allocated when you create segments in it.

To manage the tablespace Please read the Oracle Documentation. You will find lot of tricks to manage them.

Thanks

Hings

================

Still Learning...
Reply With Quote
  #3 (permalink)  
Old 04-24-03, 03:34
RastogiKamesh RastogiKamesh is offline
Registered User
 
Join Date: Apr 2003
Location: Jagdishpur
Posts: 146
Re: Tablespace growth and management

Quote:
Originally posted by dbuckingham
Hi I am curious to find out more information explaining exactly how tablespaces actually grow. I will explain what I understand thus far, and hopefully someone can fill in the gaps:

CREATE TABLESPACE test
DATAFILE 'x:\database\test.dbf' SIZE 50M
DEFAULT STORAGE (
INITIAL 50K
NEXT 50K
MINEXTENTS 2
MAXEXTENTS 50
PCTINCREASE 0);

Once this information has been specified, the test.dbf file is created of size 50M. The initial extent inside this table space is 50K. Once this initial extent fills up, then another one is created of size 50K and so on and so on untill either max extents fills up or the physical 50M is reached (size specified during creation). I believe that I understand this part ok.

What I am unsure of is, we have a database here where a number of the table spaces are a lot larger than what they were when created. Is it possible for tablespaces to also autoextend? If so, is this a setting by default or something that needs to be specified during the actual creation of the tablespace?

Basically I want to cap these tables spaces to be of a specific size and not to grow past this size unless I specify so (physically resize them).

Can some one let me know if I am on the right track with my thinking and what the easiest way to do this would be?

Cheers

Dan.



Hi Dan,
You can have auto-extend feature for tablespace which will manage & grow as per the defined way while creating it.

You may use AUTO EXTEND ON NEXT 50K MAX SIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

This will increase the extent by 50K when tablespace filled-up. I will keep on growing. You have be sure that you are having proper free space on your disk for tablespace datafile. Or yu may even limit the Max Size parameter. Plesae check the Doc. about this command.

May it help you.

Regards,
__________________
- KR
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On