RE: Tablespace with more than one file

  • From: D'Hooge Freek <Freek.DHooge@xxxxxxxxx>
  • To: "gidhin@xxxxxxxxx" <gidhin@xxxxxxxxx>, "gheibia@xxxxxxxxx" <gheibia@xxxxxxxxx>
  • Date: Mon, 12 Oct 2009 10:40:21 +0200

ok, hit the send button by accident (maybe we can add this to the major 
blunders list   ;)   )

Like I was saying:

First of all a warning: if your filesystem only allows files of max 2GB, then 
don't make your datafiles exactly 2GB in size.
Oracle adds one block to the given size:

SQL> show parameter db_block_size
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_block_size                        integer     8192
SQL> create tablespace testje
  2  extent management local autoallocate
  3  segment space management auto
  4  datafile '/opt/oracle/oradata/GUNNAR/testje.dbf' size 25600K
  5  /
Tablespace created.
SQL> !ls -lk /opt/oracle/oradata/GUNNAR/testje.dbf
-rw-r----- 1 oracle oinstall 25608 Oct 11 10:42 
/opt/oracle/oradata/GUNNAR/testje.dbf
SQL>

So, best to make your datafiles something like 2000M or so.

The datafiles are used in a round robin fashion. Oracle will try to extend them 
more or less equilly (unless one of them has hit its maxsize).

The HPUX filesystem limitation of 2GB can be eliminated by adding the 
largefiles parameter to your mount options.
I think this option is available starting with HPUX 10.20

regards,

Freek D'Hooge
Uptime
Oracle Database Administrator
e-mail: freek.dhooge@xxxxxxxxx
tel. +32 (0)3 451 23 82
http://www.uptime.be


From: oracle-l-bounce@xxxxxxxxxxxxx [oracle-l-bounce@xxxxxxxxxxxxx] On Behalf 
Of gidhin joy [gidhin@xxxxxxxxx]
Sent: 12 October 2009 09:05
To: gheibia@xxxxxxxxx
Cc: Toon Koppelaars; oracle-l-freelists
Subject: Re: Tablespace with more than one file


You are right only if the file #1 is fully used.
Check whether file #1 is auto extendable to a size more than 2G, if so make 
auto extendable off and resize it to maxsize of 2G so that further writes will 
go to file #2.

alter database datafile '/datavol/oradata/sid/file1.DBF' autoextend off;
alter database datafile '/datavol/oradata/sid/file1.DBF' resize 2G;

Best Regards
~Gidhin--
//www.freelists.org/webpage/oracle-l


Other related posts: