What is the database instance?

First, the popular explanation

Let me talk about, the database is doing what?

The database is used to store data for a long time, and we all know only a temporary storage memory, disk, etc. can really store data.

That database will be put there? Certainly is stored on disk, in fact, is a database file on disk.

From the above, we conclude that: == database files on the disk.

Since the database file on disk can be seen, how we use the database?

If we can use the database directly, it would be equivalent to the direct use of the files on the disk.

We know that such a common sense: You must put a file on disk into memory in order to use a common sense with which we previously knew the contrary.

That is not the correct process should this happen? Read the files on the disk into memory first, and then use it.

Yes, this is the correct procedure of the database.

How to read the database into memory?

This time, that instance (example) that we want to introduce. Example is the memory structure and a set of background processes.

In fact, the normal database into memory is the process by example a set of background processes read data from files on disk into memory instance, and then through the operation of the data in memory and then after instance from memory a set of background processes written to the database.

That instance relative to the case of databases, should be the operating environment of the database (with inaccurate but also very appropriate).

Second, professional interpretation

Is a collection of examples of "Memory" and "background process". Database data is physically stored. Special attention, one example of a database that can be used, multiple instances of a database can also be used at the same time, the relationship between instances and databases are many relationship. 
For example, if the database likened to an airplane, an example is the engine of the aircraft. Then, an engine can be driven aircraft, two engines can be driven aircraft at the same time. 
Multiple "instances" while driving a "database" of architecture is called, if the combination of protection mechanisms disk array, RAC can maximize the protection of the "cluster (Oracle real application clusters, referred to as RAC)", which is a high-end Oracle applications our application uninterrupted operation, data is not lost.

What is a database, it is actually very simple, the database is a medium for storing data. For example, commonly used files is one of the Oracle10G, the stored data several ways. The first is a file format, that is, create a batch file on your disk, and then store the information in these files. The second is a disk array, this is what this means, this is the explanation database is not stored as a file, but to one or more disks formatted into a format that the Oracle, equal to the entire disk is stored in an Oracle database not as other purposes. This has the advantage of high storage performance, because no other means of file formats, but rather the whole disk file system format Oracle have become the most suitable. Of course, you may also have other forms, such as network or something. But we are still the most commonly used file formats, the file format, the database refers to those data files, control files, and REDO files, etc. a series of files.

And what is it Instance, Instance is actually referring to a series of operating system processes and memory block allocated for these processes. In Oracle, we can create a new Oracle of Instance, although this time with a series of fast memory as well as the process of SGA and so on, but this time did not come in to read the database files. So just one example, later, you can command manually or automatically loaded into the database files in our database Instance, only this time the database allows us to access real start operation.

So, if you want to implement a database application, database and database Instance is indispensable, if only those files in the database, then, can only represent the data in this file, but we are unable to operate. If only the database Instance, then what data we Although acute operations, but do not know the operation, the operation generated data can not be saved, and so on. So, when a truly Load an Oracle Instance Oracle Database later, the database can be we use.

It is noted here that it is important, Oracle instance after the start, can only load a database, if you want to disconnect Instance and database, and then re-hung in a database Instance, then you need to first put the database Instance end of the process, then re-establish a process that instance, and then load another database. Otherwise, be sure to throw in addition to ORA-16169 error, said the database has been opened. Because a database Instance can only load and open an instance during its lifetime.

三、Oracle

What is the oracle? Usually referred to Oracle or Oracle database refers to the Oracle database management system. Oracle database management system is a computer software management database access (Oracle database manager system). It (instance) consists of an Oracle database and Oracle instance ( the difference between mysql, mysql no concept instance)

Oracle instance: Located in physical memory data structure, which consists of several background processes operating system and a shared memory pool composed, shared memory pool can be accessed .Oracle all processes they use to manage user access to the database if you want. access to the database (that is, files on the hard disk) in the data, must be achieved through the Oracle instance, you can not read the files on the hard disk directly. in fact, Oracle database instance is usually referred to services (service). at any time one example can be associated with a database, a database access; multiple instances of the same database that is accessible by (RAC)

1, an Oracle database system can be installed simultaneously several databases, each database corresponds to a unique instance, except OPS system, multiple instances of a database operation, known as parallel server
2, just a name, SID i.e. is INSTANCE_NAME, SERVICE_NAMES mainly used in the listener, service_names is the external service name, the server is used, a library can set up multiple external services names. For instance, your ID card tempest sledgehammer, this is the SID, but you have a lot of foreign nickname different circles, balls, two Gouzi, these external call is SERVICE_NAME.
3, NET EASY CONFIG manipulation should be the host string is client service,
      a database service names may be announced (SERVICE_NAMES)
      a client can also use string to connect to multiple hosts on the same database server
4, you can install multiple Oracle databases (the concept on a small OS ), each bank may announce service names are accomplished by init.ora and listener.ora

Note: In the mysql database and the database instance is the relationship between one to one, one to many concept different from the oracle.

Guess you like

Origin www.cnblogs.com/wayneLOVEdoris/p/11608887.html