Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Database vs. Tablespace vs. Datafiles
Hi Greg!
I think, you messed the terms. Basically: A TABLESPACE resides IN a DATAFILE. The datafile is nothing else than a physical file on your disk. The tablespace is only a "logical" unit. A tablespace can span over multiple datafiles. For example: you make a tablespace named "MYTBLSPACE". When this tablespace is full, you must add another datafile to this tablespace. The tablespace looks like one unit, now f.e. 3 GB large. But on your disk you now may have two datafiles, one 2 GB and one 1 GB in size.
When the Tablespace grows, Oracle makes an EXTENT. To do this, there must be unused space in the DATAFILE. Oracle allocates a part of the free space to the tablespace. When this occurs often, you get a performance-problem because of the fragmented tablespace. So the tablespace should be sized well to your needs.
The creation of a tablespace must not be at DB creation. You can create a tablespace every time you want with the CREATE TABLESPACE command. But it's much easier to do this with the Oracle Enterprise Manager.
I don't know what you mean with point D.
I hope, this helps you.
On Fri, 21 May 1999 03:46:35 GMT, news2_at_baxnet.net (Greg) wrote:
>I'm a little confused on this one. I'm totally new to Oracle, so bear
>with me!
>
>A) I've read tons of docs about the basic layout and policies of Oracle.
>It's my understanding that the DB is the master of it all, followed in a
>pecking order: TableSpaces, DataFiles, then Extents and other OS block
>type objects. Right?
>
>B) But this is what gets me: When I create a DB, I'm asked to assign a
>specific DATAFILE in the create script. Why a DATAFILE? Why have I
>totally jumped around the TABLESPACE here? Why the heck doesn't the
>DataBase CREATE command point to a series of specific TABLESPACEs for
>specific uses instead of a DATAFILE? Then let the DBA assign different
>DATAFILES to the tablespaces as needed?
>
>C) I read in Oracle docs that when I create a new DataBase, it wants a
>system, user, temp, index and "general data" tablespaces. But there's no
>place to add TABLESPACES in the "Create Database" statement! Am I wrong
>on that?
>
>D) I can modify TableSpaces all day long, I've gotten that far. I attach
>DataFiles to Tablespaces with no problem. But further reading states
>that the DataFile must be dedicated to the DataBase with no other uses!
>
>E) I'm lost.. I'd love to get over this hurtle, and I'm sure it's just
>the way I've interpreted all of this, or a mental block or something…
>
>Thanks in advance - Jon
Andreas Schlager
aschlager_at_kaindl.com
M. Kaindl Holzindustrie
Walser Weg 12
A-5071 Wals / Salzburg
Received on Fri May 21 1999 - 01:14:40 CDT
![]() |
![]() |