Oracle user-managed backups

Source: Internet
Author: User

Oracle user-managed backups introduces how to manage backups. the following concepts are described: Full-Database Backup: 1. consistent backup (cold backup), that is, backup after the database is closed, because the data file header and the control file SCN are the same because redo has been applied, therefore, you only need to back up data files and control files. Of course, you can also back up log files and password files. 2. non-consistent backup (hot backup), that is, the database is opened and can be read/written. The data file and the control file SCN are inconsistent, of course, shutdown abort is also a non-consistent and non-consistent backup. We can ensure Database Consistency through restoration. Our database services should be, so we can only use non-consistent backup, in addition, only inconsistent backups can be performed on databases in archive mode. local backup: tablespace backup: backs up the data files in the table space. Note that only tablespace backup in archive mode is effective, in non-archive mode, only read-only or OFFLINE tablespaces can be backed up. Note: backup of OFFLINE data files is not allowed for system tablespaces and active UNDO tablespaces: in archive mode, we can back up a single data file. In non-archive mode, we can back up read-only and OFFLINE data files. Note that the data file OFFLINE does not require checkpoint control file backup: all control files are important. To manage the database Consistency, you can use RMAN to back up the database, or use commands to back up the alter database backu. P controlfile to 'xxxxxx'; you can also use trace to back up the script command for creating the control file. as can specify the path, which is in the directory specified by USER_DUMP_DEST by default. After introducing several related concepts, let's look at several views: v $ datafile v $ controlfilev $ logfilev $ tablespace, which should be clear. If you are not clear about them, familiarize yourself with them, the user manages the Backup recovery, which is a common consistent backup (cold backup) Step: 1. find the file to be backed up 2. close the database. use System commands to copy all files for backup 4. to enable Database Inconsistency backup (hot backup), follow these steps: 1. enter the data to send the alter tablespace xxxx begin backup; 2. use System commands to copy the files to be backed up. 3. enter the database and issue the alter tablespace xxx end backup; 4. archive the redo log and use alter system archive log current during recovery. Parallel Hot backup: Set all tablespaces to begin backup. After backup, end backup for all tablespaces is used for serial Hot backup: Only one tablespace is used for hot backup. After the end, the next cold backup and hot backup are relatively simple. In my opinion, there is no need for testing, if you want to test the table space, refer to the above steps. If you only want to test the table space, you can delete the large tablespace: SQL> drop tablespace TBS_YYPT including contents and datafiles; drop tablespace TBS_YYPT including contents and datafiles * ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1ORA-02429: cannot drop index used for enforcement of unique/primary key SQL> select 'alter table' | owner | '. '| table_name | 'drop constraint' | constraint_name |'; '2 from dba_constraints 3 where constraint_type in ('U', 'P') 4 and (index_owner, index_name) in 5 (select owner, segment_name 6 from dba_segments 7 where tablespace_name = upper ('tbs _ yypt '); 'altertable' | OWNER | '. '| TA region ----------- alter table SF. a_ORDER_ITEM drop constraint A_ORDER_ITEM_PRI; SQL> alter table SF. a_ORDER_ITEM drop constraint A_ORDER_ITEM_PRI; Table altered. SQL> drop tablespace TBS_YYPT including contents and datafiles; Tablespace dropped. finally, we will introduce the DBV command, which is a tool provided by oracle to verify data file integrity. Note that it is a data file, not the log file and control file dbv file =/database/oradata/skyread/sf01.dbf logfile =/home/oracle/sf01.logDBVERIFY-Verification starting: FILE =/database/oradata/skyread/sf01.dbf DBVERIFY-Verification complete Total Pages Examined: 131072 Total Pages Processed (Data): 30634 Total Pages Failing (Data ): 0 Total Pages Processed (Index): 36107 Total Pages Failing (Index): 0 Total Pages Processed (Other): 1909 Total Pages Processed (Seg): 0 Total Pages Failing (Seg ): 0 Total Pages Empty: 62422 Total Pages Marked success upt: 0 Total Pages Influx: 0 Highest block SCN: 2430315751 (28.2430315751) can be seen help: dbv help = y DBVERIFY: release 10.2.0.4.0-Production on Thu Apr 25 13:59:48 2013 Copyright (c) 1982,200 7, Oracle. all rights reserved. keyword Description (Default) ------------------------------------------------ FILE File to Verify (NONE) START Block (First Block of File) END End Block (Last Block of File) BLOCKSIZE Logical Block Size (8192) LOGFILE Output Log (NONE) FEEDBACK Display Progress (0) PARFILE Parameter File (NONE) USERID Username/Password (NONE) SEGMENT_ID Segment ID (tsn. relfile. block) (NONE) HIGH_SCN Highest Block SCN To Verify (NONE) (scn_wrap.scn_base OR scn)

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.