Basic concepts in Oracle architecture, databases

Source: Internet
Author: User

The Oracle architecture includes the basic concepts of Oracle databases and instances. If you want to understand the Oracle architecture, you must understand these two basic concepts, the following is a detailed introduction of the article. I hope you will gain some benefits after browsing the following content.

A database is a collection of data.

Whether the database adopts a relational structure or an object-oriented structure, the Oracle database stores the data in the data file. internally, the logical ing of database structure data to files allows different data to be stored separately. These logical partitions are called tablespaces.

Table space and file introduction:

1: tablespace

A table space is the logical division of a database. Each database has at least one table space, called a system table space. A table space can only belong to one database.

Each tablespace is composed of one or more files on the same disk. These files are called data files. tablespace features:

1) control database data disk allocation

2) restrict the disk space that users can use in the tablespace

3) tablespaces have the online, offline, readonly, and readwrite attributes.

Modify the properties of a tablespace:

SQL> alter tablespace name attribute;

Query the table space status:

 
 
  1. SQL> select tablespace_name, status from dba_tablespaces; 

Note: The system, undo, and temp tablespace cannot be set as the offline attribute.

4) backup and recovery of some databases

5) The tablespace is expanded by a data file. The tablespace size is equal to the size of the data file that constitutes the tablespace.

Query the ing between a table space and a data file:

 
 
  1. SQL> select tablespace_name, bytes,
     file_name from dba_data_files; 

Table space-based operations:

1) query the user's default tablespace:

 
 
  1. SQL> select username, default_tablespace from dba_users; 

2) query the table and the tablespace that stores the table:

 
 
  1. SQL> select table_name, tablespace_name from user_tables; 

3) modify the user's default tablespace:

 
 
  1. SQL> alter user username default tablespace tablespace_name; 

4) move data from one tablespace to another:

 
 
  1. SQL> alter table table_name move tablespace tablespace_name; 

2: Data Files

Each tablespace is composed of one or more files on the same disk. These files are called data files. data files can only belong to one tablespace. the data file size can be changed after being created. to create a new tablespace, you must create a new data file. once a data file is added to a tablespace, it cannot be moved from the tablespace or be associated with other tablespaces. the three types of files required by the database are data file, control file, and redolog file.

Other files prameter file, password file, and archived log files are not required by the Oracle database. They are only auxiliary databases.

View the physical file composition of the database:

1) view data files:

 
 
  1. SQL> select * from v$datafile; 

2) view the control file:

 
 
  1. SQL> select * from v$controlfile; 

3) view log files:

 
 
  1. SQL> select * from v$logfile; 

The above content is an introduction to the Oracle database. I hope you will find some gains.

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.