Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How it works alter tablespace X default Storage...?

Re: How it works alter tablespace X default Storage...?

From: Jon Blake <jblake_at_swin.edu.au>
Date: Mon, 12 Jul 1999 15:38:59 +1000
Message-ID: <37897F73.5FA4F06E@swin.edu.au>


Huy Vu wrote:

> Hi all,
>
> I did the command
>
> Alter tablespace tbsA
> default storage
> ( initial 1M
> next 512K
> pctincrease 0
> minextents 1
> );
>
> to fix the old value of tabsA
>
> default storage
> ( initial 4K
> next 4K
> pctincrease 0
> minextents 1
> );
>
> but I still not finger out how it change inside the tablespace tbsA
> Do I need to backup the tablespace before executing this command ?
>
> The same question for resizing the tablespace...
> But how can we know the current value INITIAL & NEXT using in the
> tablespace?
>
> Thanks in advance for any idea...
>
> H.V

Huy,
  Tablespaces store segments such as tables and indexes. When you create a table or index in a tablespace, you can set the INITIAL and NEXT extent size to values you want by including a STORAGE clause. If you do not include a STORAGE clause in your CREATE TABLE or CREATE INDEX statement, Oracle will use the INITIAL and NEXT values that are in effect for the tablespace that the segment will be created in. So, if you alter the INITIAL and NEXT values for a tablespace, you are telling Oracle what INITIAL and NEXT you want for any new segments you then create after changing the tablespace's default storage parameters.

Tablespace defaults simply tell Oracle what storage parameters to apply to a segment if you don't include a storage clause in your CREATE TABLE or CREATE INDEX statement. It's a good idea to include a storage clause in these statements, and not rely upon defaults supplied by the definition of the containing tablespace.

You can query dictionary table DBA_TABLESPACES to determine the storage parameters that will be applied to new tables and indexes if you do not explicitly include a storage clause when creating these segments. As you indicated, you can change these defaults in the DEFAULT STORAGE clause of an ALTER TABLESPACE statement, but such changes have absolutely no effect upon segments that already exist in the tablespace.

If you want to change the storage parameters of an existing table and its indexes, you can export the table, drop the table, then import the export dump file. Oracle's Server Utilities Guide tells you how to do this.

Hope this helps. Received on Mon Jul 12 1999 - 00:38:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US