Analysis on the best Oracle architecture in history

Source: Internet
Author: User

For those who are new to Oracle, especially those who have previous ms SQL server experience, the most confusing thing is probably the word database and instance.

In fact, these two concepts are quite simple to understand. Let's take an example:

Notepad, I believe everyone is familiar with it. The notepad.exe in the Windows directory is a software, right. We double-click notepad.exe (or start from the command line, this is not a problem), and then there is an execution instance of notepad in the memory, this instance only exists in the memory, once the computer is shut down and restarted, the instance no longer exists.

Another example is that we have a hard disk named test.txt, which is physically stored on the hard disk, regardless of whether the computer is closed or not. Edit the hosts file.

Although oracle is much more complicated than notepad, the basic principles are the same. After installing the oracleserver software, we have an oracleexecutable program on the hard disk, such as notepad.exe. Starting an oracle instance is like starting a notepad instance. This instance exists in the memory (of course, it can also be swap to the pagafile on the hard disk due to insufficient memory ), the notepad instance has only one process (thread), while complicated oracle has many processes (threads). These processes (threads) are called background process, at the same time, because oracle needs to operate a lot of data, it is necessary to allocate a relatively large memory for him, the name of this memory is SGA. Then oracle的instanceopen a group of files, just like notepad.txt open test.txt, oracle gave this group of files a special name: database

In fact, software, instances, files, and other concepts and differences have emerged. I think the most important reason is the structure of the Computer: memory speed is fast, but content is lost after power loss; hard Disk speed is slow, but the content persists permanently. This feature determines the behavior of all computer software: To be as fast as possible, the program should run in the memory, the data should be cached in the memory; to be permanently saved, programs and data must be stored in the hard disk.

Programs running in the memory and data caching for storing the program are called instances. Programs retained on the hard disk are called software and data retained on the hard disk, we call it a file. For oracle, a group of files are required, and consistency and integrity must be maintained. This group of files is named database.

Related Data Dictionary: v $ instance v $ database

Notes

V $ instance. instance_name varchar2 (16)

V $ database. name varchar2 (9)

Therefore, the length of instance and database names is limited. If you do not enter the database and SID names when using DBCA, the prompt is: the database name must be 1 to 8 characters, and the SID must be 1 to 64 Letter and digit characters. However, I tried 10gR2 on xp and manually created an instance with a name of more than 15 characters. The instance can be successfully created and can be started up, but the instance_name field in the query v $ instance is blank, within 15 characters (including 15 characters), it is normal. It is recommended that the instance name should not exceed 15 characters, and the database name should not exceed 8 characters. Generally, it is best to keep the instance name and database name consistent.

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.