Oracle tablespace, data files, users

Source: Internet
Author: User


Oracle tablespaces, Data files, and each user's Oracle database are composed of three types of files: Data files, Log files, and Control files ). Database files provide real physical storage for database information.
Each database has one or more physical data files. Data in logical database structures (such as tables and indexes) are physically stored in database data files. The data files are generally in *. dbf format. Www.2cto.com
A data file has the following features: 1. A data file is associated with only one database; 2. Once a data file is created, the data file is only increased and decreased; 3. a tablespace (logical unit of database storage) it consists of one or more data files.
Next, let's talk about the logical structure of Oracle: the logical structure of Oracle includes table space, segments, partitions, and data blocks ), we can clearly see that. Www.2cto.com

Oracle databases are logically composed of multiple tablespaces, which physically contain one or more data files. The data file size is an integer multiple of the block size. The objects stored in the tablespace are called segments, such as data segments, index segments, and rollback segments. Segments are composed of zones, which are the smallest unit allocated to disks. The increase of segments is achieved by increasing the number of segments. The size of each partition is an integer multiple of the size of the data block. The size of each partition can be different. The data block is the smallest I/O unit in the database and also the unit of the memory data buffer, and data file storage space units. The block size is set by the DB_BLOCK_SIZE parameter, and its value should be set to an integer multiple of the operating system block size. 1. a tablespace is the largest logical unit in a database. Each tablespace consists of one or more data files. A single data file can only be associated with one tablespace. Each database has a SYSTEM tablespace that is automatically created during database creation or database installation. It is used to store the SYSTEM's data dictionary tables, Program SYSTEM units, and process functions, packages and triggers can also be used to store user data tables and index objects. Table spaces have the online and offline attributes. You can set any table space other than tablespace me to offline. Www.2cto.com 2. segment database segments can be divided into four categories: Data Segment, index segment, rollback segment, and temporary segment. 3. The partition is the smallest unit for disk space allocation. The disk is divided by zone. At least one zone is allocated each time. The partition is stored in segments and consists of continuous data blocks. 4. data block data blocks are the smallest data organization and management units in the database, the storage space units of data file disks, and the smallest unit of database I/O, the data block size is determined by the DB_BLOCK_SIZE parameter. The default values of DB_BLOCK_SIZE in different Oracle versions are different. 5. schema generally corresponds to a user. It is a set of objects (schema objects), including tables, clusters, and views), indexes, serial numbers (sequences), synonyms (synonyms), program units, and database links. Finally, let's talk about the relationship between Oracle users, tablespaces, and data files: www.2cto.com one user can use one or more tablespaces, and one tablespace can also be used by multiple users. There is no affiliation between the user and the tablespace. The tablespace is a logical concept used to manage data storage. The tablespace only has a relationship with the data file, and the data file is physical, a tablespace can contain multiple data files, and a data file can only belong to one tablespace.
The best way to explain databases, tablespaces, data files, tables, and data is to imagine a cabinet filled with stuff. The database is actually a cabinet, and the drawer in the cabinet is a tablespace, the folder in the drawer is a data file, the paper in the folder is a table, and the information written on the paper is data. Note: 1. Change the user's default schema: alter session set current_schema = xyz 2. Increase the user's permission for a tablespace: alter user username quota unlimited on tablespname

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.