Differences between the instance instance and the database in Oracle

Source: Internet
Author: User
Tags oracle database

A database server can have several databases that are marked with SIDS, such as Orcl1,orcl2,orcl3 and so on, a database such as ORCL1 can have multiple instances. Oracle database, it should be said that we are using Oracle Service server. Oracle Services server includes two parts:

One part is Oracle database databases

One part is the database instance instance.

Oracle database databases, including data files, control files, redo log files, are some of the physical files.

Database instance instance, including Database Daemon (Pmon, Smon, DBWR, LGWR, CKPT, etc.) and memory area SGA (including shared pool, db buffer cache, redo log buffer, etc.). Instance is a series of complex memory structures and operating system processes

Strictly speaking: An Oracle service that includes only one Oracle instance and one database (regardless of the situation of dual-machine parallelism, etc.). However, one instance can only correspond to one database, and one database may correspond to multiple instances.   Unless you use the parallel o r a C l e server option, each o r a C l e database has an instance associated with it, and a database is loaded by only one instance. The relationship between the database and the instance is 1 to 1/n, each Oracle database in a non-parallel database system corresponds to an instance; In a parallel database system, a database will correspond to multiple instances, at the same time the user is only associated with an instance, and when one instance fails, other instances are automatically serviced, Ensure that the database is running correctly. In any case, each instance can only correspond to one database. In practical development applications, with respect to Oracle databases, it is often heard that a database is built, a instance is created, and a instance is started. In fact, ask them what is the database, what is instance, it is possible that they give the answer is the database is instance,instance is the database Ah, no difference. Here, it can only be said that although their oracle may have some experience, but the basic concept is still not clear.
What is a database, in fact, is very simple, the database is a medium for storing data. For example, the commonly used file is one, in the oracle10g, the data storage has several kinds. The first is the file form, which is to create a batch of files on your disk and then store the information in those files. The second is the disk array form, which means that the database is not stored as a file, but instead one or more disks are formatted as Oracle, which means that the entire disk is stored in an Oracle database and cannot be used for any other purpose. The advantage is that storage performance is high because no other file format is used, but the entire disk is the most appropriate file system format for Oracle. Of course, there may be other forms, such as the Internet or something. However, our most commonly used or file format, in the file format, the database refers to those data files, control files and redo files and so on a series of files.
And what is instance, instance actually refers to a series of processes in the operating system and the memory blocks allocated to those processes. In Oracle, we can create a new Oracle instance, although there is a process and the SGA and so on a series of memory fast, but this time did not read the database files in. So just an example, in the later, you can manually or automatically load the database file into our database instance, this time the database can let us really start access operations.
Therefore, the application of the database if you want to achieve, database and database instance is integral, if only the database of those files, then, can only represent the data in this file, but we can not directly operate. And if only the database instance, then we can be acute operation, but also do not know what data to operate, the operation generated data can not be saved and so on. Therefore, the database can be used by us when an Oracle instance really load an Oracle database.
One thing to note here is that an Oracle instance can only load a database once it is started, and if you want to disconnect the database from the instance and then hang it again in a database instance, then you need to end the database instance process first, Then re-establish this instance process and load another database. Otherwise the ORA-16169 error must be thrown away, saying that the database has been opened. Because a database instance can only load and open a instance during its lifetime.

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.