Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Table Spaces and Datafiles Oracle 10G

Table Spaces and Datafiles Oracle 10G

Ratings: (0)|Views: 50 |Likes:
Published by sandeep.kale123

More info:

Published by: sandeep.kale123 on Apr 08, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

10/23/2012

pdf

text

original

 
Tablespaces and Datafiles
Oracle stores data logically in tablespaces and physically in datafiles.Tablespaces:Can belong to only one database at a timeConsist of one or more datafilesAre further divided into logical units of storageDatafiles:Can belong to only one tablespace and one databaseAre a repository for schema object data
Types of Tablespaces
SYSTEM
tablespaceCreated with the databaseContains the data dictionaryContains the
SYSTEM
undo segmentNon-
SYSTEM
tablespaceSeparate segmentsEases space administrationControls amount of space allocated to a user 
Creating Tablespaces
Sql>CREATE TABLESPACE userdataDATAFILE '---path of datafile---- /userdata01.dbf'SIZE 100M AUTOEXTEND ON NEXT 5M MAXSIZE 200M;
Space Management in TablespacesLocally managed tablespace:
Free extents managed in the tablespaceBitmap is used to record free extentsEach bit corresponds to a block or group of blocksBit value indicates free or usedReduced contention on data dictionary tablesNo undo generated when space allocation or deallocation occursNo coalescing required
 
Sql>CREATE TABLESPACE userdataDATAFILE '---path of datafile----- /userdata01.dbf'SIZE 500M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K 
;
Dictionary-managed tablespace
:
Free extents are managed by the data dictionaryAppropriate tables are updated when extents are allocated or deallocatedExtents are managed in the data dictionaryEach segment stored in the tablespace can have a different storage clauseCoalescing required
Sql>CREATE TABLESPACE userdataDATAFILE '---path of datafile----- /userdata01.dbf'SIZE 500M EXTENT MANAGEMENT DICTIONARYDEFAULT STORAGE(initial 1M NEXT 1M PCTINCREASE 0
);
Undo Tablespace
Used to store undo segments
Cannot contain any other objects
Extents are locally managed
Can only use the
DATAFILE
and
EXTENT MANAGEMENT
clauses
Sql>CREATE UNDO TABLESPACE undo1DATAFILE '---path of datafile---- /undo01.dbf'SIZE 40M 
;
Temporary Tablespaces
 Used for sort operations Cannot contain any permanent objects Locally managed extents recommended
Sql>CREATE TEMPORARY TABLESPACE tempTEMPFILE '---path of datafile-----/temp01.dbf' SIZE 500M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 4M;
 
Default Temporary Tablespace
 Specifies a database-wide default temporary tablespaceEliminates using
SYSTEM
tablespace for storingtemporary dataCan be created by using:
CREATE DATABASE
Locally managed
ALTER DATABASE Sql>
ALTER DATABASEDEFAULT TEMPORARY TABLESPACE temp
Read Only Tablespaces
Causes a checkpointData available only for read operationsObjects can be dropped from tablespace
Sql>ALTER TABLESPACE userdata READ ONLY
;
Taking a Tablespace Offline
Not available for data accessTablespaces that cannot be taken offline:
SYSTEM
tablespaceTablespaces with active undo segmentsDefault temporary tablespace
Sql>ALTER TABLESPACE userdata OFFLINE;Sql>ALTER TABLESPACE userdata ONLINE
;
Changing Storage Settings
Using
ALTER TABLESPACE
command to change storage settings
 Sql>ALTER TABLESPACE userdataDEFAULT STORAGE (INITIAL 2M NEXT 2M MAXEXTENTS 999
);

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->