Oracle Database Backup Recovery, inspection object settings and related recovery overview, oracle Database Backup

Source: Internet
Author: User

Oracle Database Backup Recovery, inspection object settings and related recovery overview, oracle Database Backup

Database backup and recovery, inspection needs to pay attention to the object settings:

1. database Name and DBID; -- dbid is in v $ database
SYS @ ORCL> select dbid, name from v $ database;

DBID NAME
-------------------
1385095721 ORCL

2. Control the file location;
Show parameter control_files;
Select name from v $ controlfile;

3. Log File Location and database archiving settings;
Select log_mode from v $ database;
Archive log list;

Select * from v $ log;
Select * from v $ logfile;
-- Focus on the number, size, status, and location of log groups;
Select * from v $ archived_log;

4. data file location, size, and status;
Select * from dba_tablespaces;
Select * from v $ tablespace;
Select * from dab_data_files;
Select * from v $ datafile;
-- In the 11 GB database, you only need to pay attention to the size of the temporary tablespace;

5. parameter file;
Show parameter spfile;

6. alarm logs;
Select * from v $ diag_info;
Adrci

7. Existing Database Backup policies and backup sets;

 

To open a database, the following conditions must be met:
 

1. All control files must exist and have been synchronized

2. All online data files must exist and have been synchronized
3. Each redo log group must have at least one member.

 

After you open the database, the database will fail if the following items are lost:

1. Any control file
2. data files belonging to the system or restored tablespace
3. The entire redo log group (as long as at least one member in the group is available, the instance will remain open)

 

If the control file is lost or damaged, the instance is usually aborted. You must perform the following steps:

1. Close the instance (if it is still open ).

2. Copy the existing control file to restore the missing control file.
3. Start the instance.

If a member in the redo log file group is lost and at least one member exists in the group, note the following:

The normal operation of the instance is not affected.

The Alert Log receives a message notifying you that a member cannot be found.

You can copy a remaining file from the same group to restore the missing log file.

 

Data files are lost in NOARCHIVELOG mode.
 
If the database is in NOARCHIVELOG mode and any data files are lost, you need to completely restore the database, including the control file and

There are data files.
When the database is in NOARCHIVELOG mode, it can only be restored to the status of the last backup. Therefore, the user must re-enter

Changes made since the last backup.

Perform the following tasks:

1. If the instance has not been closed, close the instance.
2. Restore the entire database from backup, including all data files and control files.

3. Open the database.

4. Ask the user to re-enter all changes made since the last backup.

If a database in NOARCHIVELOG mode has an incremental backup policy. Then RMAN restores the nearest 0 level, and then RMAN restores

And then apply Incremental backup.


Key System data files are lost in ARCHIVELOG mode.

If a data file is lost or damaged and belongs to the SYSTEM or UNDO tablespace,
Perform the following tasks:

1. The instance may or may not be automatically closed. If the instance is not automatically closed, use shutdown abort to close the instance.

2. Load the database.
3. Restore and restore the missing data files.

4. Open the database.

 

 

 


Want to learn more about Oracle Database Development

I am an O & M engineer. I have a comprehensive knowledge of O & M. The Linux Command must be used in plenary sessions, because SQLPLUS is used,
Database Backup, cold backup, hot backup, RMAN usage, data import and export,
Oracle 10G/11G operations, mainly table, index, trigger creation and deletion, data cleaning, familiar with SQL statement Query

ORACLE performance adjustment, high availability construction, standby construction, etc... Many

ORACLE tablespace settings

1. It is divided into multiple data files.
The reason is:
(1) Some operating systems have restrictions on the file size or installation. You may not be aware of these restrictions. In addition, some versions of the Transfer Protocol do not support excessive files. For example, sftp of a certain version of AIX does not allow the transfer of files larger than 2 GB.
(2) You have a small amount of data, so you don't have to worry too much about it. However, when the data volume increases in the future, we need to consider load balancing, we need to move some data files to other disks. Multiple data files make it easy.
(3) When a part of your data file contains bad blocks, you need to temporarily restore a data file offline. If your data file is too large, the impact may be even greater.
(4) use RMAN to back up data files separately. Recovery can also be restored separately, so it is obvious that it is advantageous to split multiple data files.

2. The size of a single data file. There are many things to consider. For example, your storage performance, your total data volume, and so on. The expert suggested that the size of a single data file is generally 2-10 Gb for dozens to hundreds of GB of data. The Principles have a set of theoretical explanations, but I forgot to mention my personal suggestions:
(1) Operating System Restrictions. If this problem is not noticed, it is very likely to cause problems, especially self-extended data files, such as system and undotbs.
(2) The tablespace size. Consider moving or restoring a single data file. Obviously, if dozens of GB tablespaces are divided into two data files, it does not bring any benefits to your operations.
(3) The raid situation of your hard disk should be considered based on experience. The situation is complex and can only be compromised. It cannot be simply generalized to be big or small.

Of course, this is not the main thing. You do not need to pay too much attention to this aspect. For a simple environment like yours, the modification of the size of a tablespace data file in the partition area is not as good as the performance improvement!

3. What should I do if the database generates fragments. I will tell you that the fragmentation of the database is different from that of windows. Do not confuse it. Windows is useless.
In fact, I honestly tell you that you don't have to worry about fragmentation issues in the short term for dozens of GB databases. In this case, we all know that the database is getting slower, and we need to recycle the segment space. In addition, if you say "whether to shut down or not", it means that your database can be shut down, which implies that it is "not very busy ", so you don't have to worry about doing this in the last 3-5 years.

4. It is unreasonable for two databases to use a listener 1521 at the same time. You cannot connect two databases with one listener. Do you think this is a great risk?
The two public ports have no impact on the data throughput performance. However, security is undoubtedly very low.
Therefore, of course, it is necessary to use two ports 1521 and 1520. In fact, I suggest you install the two databases under two different operating system users so that everyone can understand each other's logic and minimize the impact, you can learn more about the benefits. This is purely from my work experience. If you are in trouble, I will not say so.
How to Set it? This is a complicated question. I am too lazy to write a bunch of TNS editors.
Let me tell you a simple method. Run the command line to input netca to create two listeners, 1521 and 1520. Then run the command line dbca to create a database. Note that you will be prompted to bind the database to a port during the creation process. Just select the port. The graphic interface is very simple.
-------------------------------

I can see that you are a beginner and think about things in detail, but I will give you a suggestion to buy basic books, understand basic concepts, and do some simple experiments. In this way, you can find out what is important and where is not important.
In this way, you can grasp the key points and quickly improve.

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.