Differences between Instance instances and databases in Oracle

Source: Internet
Author: User

What is the difference between an Instance and a database in Oracle? database is actually very simple. database is a medium for storing data. For example, common files are one type. There are several types of data storage in Oracle10G. The first is the file format, that is, creating a batch of files in your disk and storing information in these files. The second is the disk array form. What does this mean? It means that the database is not stored as a certain file, but formatted one or more disks into a format of Oracle, it means that the entire disk is stored in the Oracle database and cannot be used for other purposes. The advantage of www.2cto.com is the high storage performance, because the entire disk is the most suitable File System Format for Oracle, instead of using other file formats. Of course, there may be other forms, such as networks. However, we usually use file formats. In file formats, databases refer to a series of files, such as data files, control files, and REDO files. What is an Instance? An Instance actually refers to a series of processes in the operating system and the memory blocks allocated to these processes. In Oracle, we can create an Oracle Instance. At this time, although the process and a series of memory such as SGA are fast, database files are not read at this time. So it's just an Instance. Later, you can manually or automatically load the database file into our database Instance through commands, at this time, the database can let us really start accessing the operation. Www.2cto.com, If You Want To implement database applications, databases and database instances are indispensable. If only those files of the database are available, data can only be represented in this file, however, we cannot directly perform the operation. However, if only the database Instance is available, even though we can perform an acute operation, we do not know which data is operated, and the data generated by the operation cannot be saved. Therefore, when an Oracle Instance loads an Oracle Database, the Database can be used. Note that the Oracle Instance can only load the database once after it is started. If you want to disconnect the database from the Instance and then re-mount it to a database Instance, then you need to first stop the database Instance process, then re-establish a process for this instance, and then load another database. Otherwise, you must throw the ORA-16169 error, saying the database has been opened. Because a database Instance can only load and open one instance during its lifecycle. ORACLE instance = the memory (SGA) instance used by the process + process is a temporary thing. You can also think that it represents the status of the database at a certain time! Database = redo file + control file + data file + temporary file database is permanent and a collection of files. Relationship between ORACLE instances and databases 1. temporary and Permanent 2. the instance can start startup nomount independently without data files. Generally, it does not make sense. 3. an instance can only load (alter database mount) and open (alter database open) a database within its lifetime. A database can be loaded and opened by many instances at the same time (that is, RAC). The role of instances in the RAC environment can be fully reflected! The following is a detailed explanation of instances and databases: There are two words in the Oracle field that are easy to confuse, namely, "instance" and "database ). As an Oracle term, these two terms are defined as follows: q database: a collection of physical operating system files or disks. When Oracle 10 Gb Automatic Storage Management (ASM) or RAW partition is used, the database may not be used as a separate file in the operating system, but the definition remains unchanged. Q instance: A group of Oracle background processes/threads and a shared memory zone. These memories are shared by threads/processes running on the same computer. Here, you can maintain easy-to-lose and non-persistent content (some can be refreshed and output to the disk ). Database instances can exist even if there is no disk storage. Maybe the instance is not the most useful thing in the world, but you can think of it as the most useful thing, which helps draw a line between the instance and the database. These two words are sometimes interchangeable, but they have different concepts. The relationship between the instance and the database is that the database can be loaded and opened by multiple instances, and the instance can load and open a database at any time point. In fact, to be precise, the instance can load and open a database at most throughout its life! This example will be introduced later. Are you confused? We will give further explanations to help you understand these concepts. An instance is a group of operating system processes (or multi-threaded processes) and some memory. These processes can operate databases, while databases are just a collection of files (including data files, temporary files, redo log files, and control files ). At any time, an instance can only have a group of related files (associated with a database ). In most cases, the opposite is true: only one instance in a database operates on it. However, the Real Application cluster (RAC) of Oracle is an exception. This is an option provided by Oracle that allows operations on multiple computers in the cluster environment, in this way, multiple instances can simultaneously load and open a database (located on a group of shared physical disks ). Therefore, we can access the database from multiple computers at the same time. Oracle RAC supports highly available systems and can be used to build highly scalable solutions.

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.