//*/

Sunday, 24 January 2016

Tablespaces in Oracle

Tablespaces is container which holds the segments. Each and every segment belongs to exactly one table space. A tablespace may have many segments within it. All extents of a given segment will be found in tablespace associated with the segment.
Segments never cross table space boundaries. A tablespace itself has one or more data filers associated with. An extent for any given segment in a table space will contain entirely within one data file. However , a segment may have extents from many different data files.
As a developer , we will create segments in table space. And table will create by DBA.

sysntax:
create tablespace alts add datafile '/disk1/oradata/chica/alts1.dbf' size 10m;
Using above statement we can create tablespace.
Here alts is tablespace name.
Every tablspace must have at least one data file. Here alts1 is the data file which is creating in the above given path.