Solved

Maximum space that can be allocated to a new data file

Posted on 2007-03-20
5
911 Views
Last Modified: 2008-01-09
We use Oracle 9i. I have to create a new tablespace with an underlying new data file of 500 MB.  I do not know how much free database size available.
I gave the command
select sum( bytes / ( 1024 * 1024 ) ) from dba_data_files;
and got 5145

So I think that means 5 GB of space is occupied by existing data files.

How do I know the maximum space I can allocate to this new datafile ?
0
Comment
Question by:sapnam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 17

Accepted Solution

by:
NicksonKoh earned 84 total points
ID: 18754516
Here's an extract I got from TOAD

========================
There is always some ambiguity regarding the datafile size limit on a given platform and version of the database. This topic addresses a simple way of identifying the maximum size to which a datafile can grow before switching to the next datafile. To do this, create a tablespace with some default values and set AUTOEXTEND on without the MAXSIZE specified:

SQL> Create tablespace WORK_SPACE_DATA
       datafile '/keg4/oradata/fpdev1/work_space_data01.dbf'
       size 400M AUTOEXTEND ON
       EXTENT MANAGEMENT LOCAL UNIFORM SIZE 4M NOLOGGING;
Get the file id of the datafile created for the WORK_SPACE_DATA tablespace:

SQL> select file_id,file_name,autoextensible
       from dba_data_files
       where tablespace_name like 'WORK_SPACE_DATA';
FILE_ID       AUT      FILE_NAME
----------    ---      -------
31            YES      /keg4/oradata/fpdev1/work_space_data01.dbf
Querying the filext$ table, you can get the value of the maximum size in database blocks to which the datafile can grow before switching to the next file. This must be the maximum filesize that Oracle can understand for a database datafile.

SQL> select * from filext$
                     where file# = 31;
FILE#              MAXEXTEND             INC
----------        ----------           ----------
        31         4194302                1
Setting the default would give you a maximum value of 4194302 blocks with increments of 1 block when the datafile extends.

On a database of 8K block size this would work out to be:

SQL> select (4194302*8192)/1024 from dual;
 4194302*8
----------
  33554416
The database datafile can have a maximum size of 33.55Gb on a 8k database block size and Sun Solaris8 platform. The above shows that the dependency is on the database block size for a given platform. If you do not set the MAXEXTEND for the datafile, then the first datafile would grow to the MAXEXTEND value. Only then would it shift to the next datafile for a given tablespace with multiple datafiles. This makes it imperative to set the MAXEXTEND value when turning on the AUTOEXTEND option.

cheers
Nickson
0
 
LVL 22

Assisted Solution

by:Ivo Stoykov
Ivo Stoykov earned 83 total points
ID: 18754538
Hello sapnam

Nevertheless oracle manages larger files, I would obey the OS max file size limit becuase one could face dificulties trying to manipulate these data files lately through the OS.

HTH

!i!
0
 
LVL 35

Assisted Solution

by:Mark Geerlings
Mark Geerlings earned 83 total points
ID: 18756323
"How do I know the maximum space I can allocate to this new datafile?"

You cannot answer that question with information from Oracle only!  This also depends on how much free space your operating system has on the disk.  If your disk only has 300M of free space, you cannot create an Oracle data file larger than 300M on that disk.

If the disk show lots of free space though, then the maximum space you can allocate is the smallest of these three:
1. the available space on the disk
2. the O/S limit for a file size (with some 32-bit operating systems, this is 2GB)
3. the Oracle limit for a file size (varies by version of Oracle)

You didn't tell us your operating system, but I would guess that you could create a datafile of 2GB with no problem.  If you create a datafile larger than 2GB though, you may (or may not) have some problems with it.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20591311
Forced accept.

Computer101
EE Admin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to recover a database from a user managed backup
Suggested Courses

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question