Oracle learning Summary 8

Source: Internet
Author: User

Common Summary of RMAN.
1 backup
RMAN target sys/sys @ demo nocataglog
RMAN> run {
Configure Channel Device Type disk maxpiecesize 400 m;
Configure device type disk parallelism 3; (3 channels)
Backup database format = 'd: \ XXXX \ XXX \ % d _ % S _ % P. Pak ';
}

List backup;

RMAN> report Schema; (view solution)
Backup tablespace:
Backup tablespace users format = 'd: \ backup \ RMAN \ % N _ % S. Bak ';
List:
List backup of tablespace users;
Show backup configuration
Show all;
Back up data files and control files:
Backup datafile 5 format = 'd: \ XXX. dbf' include current controlfile;
Compressed backup:
Backup as compressed backupset tablespace users format = 'd: \ XXXX. dbf ';

2 Recovery
In fact, the number of recovered routes is similar to that without RMAN. Join Oracle study summary 7, for example:
A. Restore the database
Startup force Mount
Run
{
Restore database;
Recover Databse;
SQL 'alter database open ';
}
If the disk is faulty, each data file in the database will be used
Set newname for datafile 1 to 'C: \ XXXX. dbf ';
.........
Restore database;
Switch datafile all;
Recover Databse;
SQL 'alter database open ';
}
B. Restore System
If deleted
Run
{
Restore datafile 1;
Recover datafile 1;
SQL 'alter database open ';
}
If the media is broken
Startup force Mount
Run
{
Set newname for datafile 1 to 'C: \ XXXX. dbf ';
Restore datafile 1;
Switch datafile 1;
Recover datafile 1;
SQL 'alter database open ';
}

C. Data Files in other tablespaces are damaged.
If deleted
Startup force Mount
Run
{
SQL 'alter database datafile 1 offline'
SQL 'alter database open ';
Restore datafile 1;
Recover datafile 1;
SQL 'alter database datafile 1 online ';
}
If the media is broken

Startup force Mount
Run
{
SQL 'alter database datafile 1 offline'
SQL 'alter database open ';
Set newname for datafile 1 to 'C: \ XXXX. dbf ';
Restore datafile 1;

Switch datafile 1;
Recover datafile 1;
SQL 'alter database datafile 1 online ';
}
If the tablespace is deleted or the media is damaged, the principle is similar to the previous one.
Change to SQL 'alter tablespace users offline for recover ';

3. Common Operations
List backup of controlfile;
List backup of archivelog all;
List backup of spfile;
Check all backup Sets
Crosscheck backup;
List backupset backup Set ID;
Check all data file backup sets:
Crosscheck backup of database;
Crosscheck backup of tablespace users;
Crosscheck backup of datafile 4;
Crosscheck backup of controlfile;
Delete old backup:
Delete Obsolete;

 
 

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.