Oracle Backup Common Commands

Source: Internet
Author: User

  

Oracle is also one of the most commonly used databases, is it sometimes tricky to back up? Save the following information, I believe it will help you.

I. Common BACKUP commands

1.list backup; Lists all the back up information in the database.

2.list backup of controlfile; Lists all backup control files.

The ID number of the corresponding data file for the 3.list backup of datafile ' or list backup of datafile. Data file full path. dbf '; Lists the data files for the specified backup.

4.list backup of Archivelog all; Lists all backed up archive files.

5.list copy of tablespace ' table space name '; Lists the backup information for the specified table space.

6.list expired backup; lists invalid backups.

7.delete obsolete; Delete outdated backups.

8.delete expired backup; Delete invalid backups.

9.delete expired copy; Delete expired copy.

10.delete backupset backup set number; Deletes the specified backup set.

11.delete backup; Delete all backup sets.

12.delete copy; Delete all copies of the image.

13.report need backup; View the required file

14.report need backup tablespace table space name; see if a backup is required for the specified tablespace.

15.crosscheck Archivelog All; Check that the archive file is valid

16.crosscheck backup; Check all backup sets.

Related to Rman

List backup of database (see full Library backup of databases, all details included)

List Backup of tablespace users (view a backup of the users table space)

List backup of datafile 5; (5 is the file ID of the tablespace)

List backup of Controlfile (see Backup of control text information)

List backup of datafile ' +datadg/cboms/datafile/users.264.735423243 ';(view backups based on specific location of data files

List expired backup; (invalid backup)

List expired archivelog all; (View invalid archive log logs)

List Backup of database summary (this is an overview, an intuitive, comprehensive understanding of the database)

List Backup of database summary

List Backup of Archivelog all summary

List Backup of Tablespace users summary

List Backup of DataFile 5 summary

Crosscheck archivelog All; Verify the DB archive log is missing

Crosscheck backup; Verify that the database back-up set is missing

Delete expired archivelog all; command to delete all expired archive logs

Rman> crosscheck Backup;

Using channel Ora_disk_1

crosschecked backup Piece:found to be ' AVAILABLE '

Backup Piece HANDLE=/U01/FLASH_RECOVERY_AREA/DBTEST/BACKUPSET/2012_04_21/O1_MF_NNNDF_TAG20120421T153359_7S4RQ7V6 _.BKP recid=22 stamp=781198439

crosschecked backup Piece:found to be ' AVAILABLE '

Backup Piece handle=/u01/flash_recovery_area/dbtest/backupset/2012_04_21/o1_mf_ncnnf_tag20120421t153359_7s4rsm9k _.BKP recid=23 stamp=781198515

Crosschecked 2 Objects

Rman>

17. Modify the backup status with change, such as modify table space

Rman> backup tablespace users format '/BACKUP/RMANBACKUP/USERSCP ';

Starting backup at 21-apr-12

Using channel Ora_disk_1

Channel ora_disk_1:starting full datafile backupset

Channel ora_disk_1:specifying DataFile (s) in Backupset

Input datafile fno=00004 name=/u01/oradata/dbtest/users01.dbf

Channel ora_disk_1:starting piece 1 at 21-apr-12

Channel ora_disk_1:finished piece 1 at 21-apr-12

Piece HANDLE=/BACKUP/RMANBACKUP/USERSCP tag=tag20120421t155115 comment=none

Channel Ora_disk_1:backup set complete, elapsed time:00:00:01

Finished backup at 21-apr-12

Rman> list Backup of tablespace users;

List of Backup Sets

===================

BS Key type LV Size Device Type Elapsed Time Completion time

------- ---- -- ---------- ----------- ------------ ---------------

2.02M DISK 00:00:00 21-apr-12

BP key:28 status:available Compressed:no tag:tag20120421t155115

Piece Name:/BACKUP/RMANBACKUP/USERSCP

List of Datafiles in backup set 24

File LV Type Ckp SCN Ckp time Name

---- -- ---- ---------- --------- ----

4 Full 1388204 21-APR-12/U01/ORADATA/DBTEST/USERS01.DBF

Rman> change backup of tablespace users unavailable;

Changed backup piece unavailable

Backup piece HANDLE=/BACKUP/RMANBACKUP/USERSCP recid=28 stamp=781199475

Changed 1 objects to unavailable status

Rman> list Backup of tablespace users;

List of Backup Sets

===================

BS Key type LV Size Device Type Elapsed Time Completion time

------- ---- -- ---------- ----------- ------------ ---------------

2.02M DISK 00:00:00 21-apr-12

BP key:28 status:unavailable Compressed:no tag:tag20120421t155115

Piece Name:/BACKUP/RMANBACKUP/USERSCP

List of Datafiles in backup set 24

File LV Type Ckp SCN Ckp time Name

---- -- ---- ---------- --------- ----

4 Full 1388204 21-APR-12/U01/ORADATA/DBTEST/USERS01.DBF

Rman>

If you do not specify a tablespace location to change the state, it will not succeed. Such as:

rman> change backupset unavailable;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE, STACK follows ===============

RMAN-00571: ===========================================================

Rman-03009:failure of unavailable command on Ora_disk_1 channel at 04/21/2012 15:46:29

Ora-19813:cannot have unavailable file/u01/flash_recovery_area/dbtest/backupset/2012_04_21/o1_mf_annnn_ TAG20120421T154318_7S4S8PX3_.BKP in Db_recovery_file_dest

Two. Use data backup software--multi-backup.

Download multi-backup clients can start easy backup, can't remember the backup command let the multi-backup to help you finish it!

1. Unzip the download and then double-click the multi-backup icon to let it run.

Then a page pops up ↓

  

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6D/A5/wKiom1VoIuqwjTa3AAGO6xCESxk119.jpg "title=" Picture 10.png "alt=" Wkiom1voiuqwjta3aago6xcesxk119.jpg "/>


2. Then click Oracle

  

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6D/A5/wKiom1VoIv-y-2WnAACqWqPK10k517.jpg "title=" Picture 121.png "alt=" Wkiom1voiv-y-2wnaacqwqpk10k517.jpg "/>


  

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6D/A1/wKioL1VoJKTxN324AADJdym_PaE952.jpg "title=" Picture 123.png "alt=" Wkiol1vojktxn324aadjdym_pae952.jpg "/>


3. After selecting the temporary file directory backup, you can click "Save" to start the backup.

  

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6D/A5/wKiom1VoIyXhpyVfAACDSqYEfjs862.jpg "title=" Picture 124.png "alt=" Wkiom1voiyxhpyvfaacdsqyefjs862.jpg "/>


4. The backup succeeds without a moment.

So, sometimes choosing the right backup software is more than a multiplier. Multiple backups support not only database backup, but also file class backup. At the same time, support for local data backup, cloud Backup and hybrid backup, basically meet the needs of the vast numbers of users. Whether you are an individual or a business, you can use a multi-backup client.

Heart than action, speed to backup it!


Oracle Backup common commands

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.