Oracle tablespace what is




















I promised this tutorial a while ago but never had a chance to do it since then. However here I am today, finally starting a new series on Tablespace in Oracle database. Oracle database stores schema objects such as tables , indexes , Views etc. So we can say that Tablespaces are logical storage units made up of one or more datafiles.

Let me try to explain it to you in detail. Datafiles are physical files stored on your disk created by Oracle database and has. These files are not only capable of storing tables but also indexes, synonyms, views and other schema objects created by you. These files are written by database writer DBWR processes and used by Oracle database for the proper functioning of your database system. I suggest you Do not try to modify these files manually.

A datafile cannot be shared between multiple tablespaces which means that every datafile belongs to a specific tablespace. Then comes the Tablespace. Tablespaces are the logical entity in our database and logically organized data which is physically stored in datafiles.

A tablespace belongs to only one database and has at least one datafile that is used to store data for the associated tablespace. We can also define tablespaces as logical storage units made up of one or more datafiles. One tablespace can have up to datafiles. This number also depends upon your OS. For example, all application objects can be grouped into a single tablespace to simplify maintenance operations.

A tablespace consists of one or more physical data files. Database objects assigned to a tablespace are stored in the physical data files of that tablespace. Tablespaces provide a means to physically locate data on storage. When you define the data files that comprise a tablespace, you specify a storage location for these files. For example, you might specify a data file location for a certain tablespace as a designated host directory implying a certain disk volume or designated Oracle Automatic Storage Management disk group.

Any schema objects assigned to that tablespace then get located in the specified storage location. Tablespaces also provide a unit of backup and recovery. The backup and recovery features of Oracle Database enable you to back up or recover at the tablespace level. Table describes some tablespaces included in the database.

This tablespace contains the sample schemas that are included with Oracle Database. The sample schemas provide a common platform for examples. Oracle documentation and educational materials contain examples based on the sample schemas. If you are running the database in automatic undo management mode, then at least one UNDO tablespace must be online.

If you are running the database in manual undo management mode, then at least one rollback segment other than the SYSTEM rollback segment must be online. Use this clause to determine whether the tablespace is a bigfile or smallfile tablespace. This clause overrides any default tablespace type setting for the database. A bigfile tablespace contains only one datafile or tempfile, which can contain up to approximately 4 billion 2 32 blocks. The maximum size of the single datafile or tempfile is terabytes TB for a tablespace with 32K blocks and 32TB for a tablespace with 8K blocks.

A smallfile tablespace is a traditional Oracle tablespace, which can contain datafiles or tempfiles, each of which can contain up to approximately 4 million 2 22 blocks. If you omit this clause, then Oracle Database uses the current default tablespace type of permanent or temporary tablespace set for the database. If you specify BIGFILE for a permanent tablespace, then the database by default creates a locally managed tablespace with automatic segment-space management. Restrictions on Bigfile Tablespaces Bigfile tablespaces are subject to the following restrictions:.

Oracle Database Administrator's Guide for more information on using bigfile tablespaces. Use the following clauses to create a permanent tablespace. Some of these clauses are also used to create a temporary or undo tablespace. For guidelines on creating this tablespace, please refer to Oracle Database Upgrade Guide. Specify the datafiles to make up the permanent tablespace or the tempfiles to make up the temporary tablespace.

For Automatic Storage Management diskgroup files, the parameter must be set to a multiple file creation form of Automatic Storage Management filenames. If this parameter is set, then the database creates a system-named MB file in the default file destination specified in the parameter.

Notes on Specifying Datafiles and Tempfiles. In this case, Automatic Storage Management creates a datafile in the specified disk group with a system-generated filename. The datafile is auto-extensible with an unlimited maximum size and a default size of MB. This clause is valid only for a dictionary-managed tablespace.

Specify the minimum size of an extent in the tablespace. Specify the default logging attributes of all tables, indexes, materialized views, materialized view logs, and partitions within the tablespace. This clause is not valid for a temporary or undo tablespace. The tablespace-level logging attribute can be overridden by logging specifications at the table, index, materialized view, materialized view log, and partition levels.

Oracle strongly recommends that you create tablespaces that are locally managed rather than dictionary managed. This clause lets you specify default storage parameters for all objects created in the tablespace and default compression of data for all tables created in the tablespace. This clause is not valid for a temporary tablespace. Use these clauses to determine whether the tablespace is online or offline.

This is the default. This syntax has been deprecated. The creation of new dictionary-managed tablespaces is scheduled for desupport. Locally managed tablespaces have some part of the tablespace set aside for a bitmap. This is the default for permanent tablespaces.

Temporary tablespaces are always automatically created with locally managed extents. Users cannot specify an extent size.



0コメント

  • 1000 / 1000