Oarcle Learning Notes---FAQ collection

Source: Internet
Author: User
Tags log rollback oracle database backup
What is the relationship between Note 1, instance, and Sid? What is the relationship between an instance and a database?
People often ask what is SID? Sid is a recurring variable in Oracle systems, such as environment variable ORACLE_SID, initialization file Initsid.ora, what is SID? In fact, SIDs are the identities of Oracle instances, and different SIDS correspond to different memory buffers (SGA) and different background processes. So that we can do it right on a physical server can have more than one SID database instance.

A running Oracle database can be viewed as an Oracle server, consisting of databases and instances (Instance), where, in general, an Oracle The server contains an instance and a corresponding database, but in exceptional cases, such as the ops,9i RAC of 8i, a database in one server can correspond to multiple instances.

A set of physical files (data files, control files, online logs, etc.) or the corresponding logical structure (tablespace, segment, etc.) is called a database, simply, is a series of physical files related to the composition of the disk. The Oracle memory structure and background processes are used as instances of the database, one instance can only be installed (Mount) and open (open) on a database, responsible for the corresponding operation of the database and interact with the user.

2. What is the relationship between Oracle database and instance?

The database is made up of physical files and access data files, and when an instance of the data file is accessed, the database is called a single node database. This is the most common form of database we see. Of course, there is a multi-node database, is more than one instance of common access to a database (or to share a group of data files), better provide stability and parallel processing capabilities. This is called OPS (Oracle Parallel Server) in 8i and is called the RAC (real application cluster) in Oracle9i. In this kind of database. Two/More instances are on different servers, all Oracle data files are on shared disk arrays, instances on multiple servers can work simultaneously, and they communicate through an internal network. If a server does not provide services, another will take over its work, especially in the critical business has great potential.

3, in the running of the database in the data file is not likely to have not been submitted data?

This is possible because the data for the user data file is written by DBWR, and DBWR is a very low-level background process that is not responsible for interacting with the user. The user's interaction is done by LGWR.

4, in question 3, if there is no written data, then the machine suddenly power off, data integrity will not be damaged?

No, because the integrity of the database is LGWR, and Oracle guarantees that any modifications to the DBWR written to the data file have been recorded in the Redo log file. When the system starts again, you can read the redo log file to know that the data has not been submitted. Oracle automatically rolls back those data at this point. Therefore, the corruption of the online log, especially the current online log, has a huge impact on the database and may result in incomplete databases.

5, data file corruption will lose data?

It can be said that if you have backup and archive, it won't. Since all records modified by the data are recorded in the redo log so that no data is lost, you can recover all the data by restoring the previous backup and then using the archive log file recovery and the current online redo log.

6, online redo log damage will lose data?

Online logging is extremely damaging to the database, so it is possible not only to lose data, but also to cause the database to be out of sync. All commit records in the redo log are lost, which is why Oracle is mirroring the online redo log files. Any loss of data is not allowed.

7. Can I specify not to write rollback section in the transaction?

No, the write rollback segment is the root of Oracle's guaranteed consistency read and transactional consistency. The rollback segment is a high write segment and is recommended to be placed on a separate device. For DDL statements, such as drop,truncate can not write back the rollback segment (no undo information), so for the entire table deletion, if the amount of data is large, it is recommended to use the TRUNCATE table method. It is not possible to write an online journal, but you can write very few online logs in certain actions, such as creating a table in Nologging through the CREATE TABLE tablename as SELECT, or insert data into a table in a append manner. or direct loading.


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.