/201408/327614.htmlConfiguring Rman and backing upRman> Show All;RMAN configuration parameters for database with Db_unique_name SCPDB01 is:CONFIGURE RETENTION POLICY to RECOVERY windows of 7 days;CONFIGURE BACKUP optimization OFF; # DefaultCONFIGURE DEFAULT DEVICE TYPE to DISK;CONFIGURE Controlfile autobackup on;CONFIG
Command: connecttarget (connecttargetsystemoracle @ ora10g. If the database does not exist, you can directly start it with startup under the rman command.
Command: connect target/(connect target system/oracle @ ora10g. If the database does not exist, you can directly start it with startup under the rman command.
1. Check the database mode:Sqlplus/nologConn/as sysdbaArchive log list (check whether the da
1. Check the database mode:Sqlplus/nologConn/as sysdbaArchive log list (check whether the database is in archive Mode)
If not, the database archive mode is modified.Startup mountAlter database archivelogAlter database open
2. connect to the target database
Command: connect target/(connect target system/Oracle @ ora10g. If the database does not exist, run the rman command to start the database using startup)You can connect to the target database. (
Monitor the Data Backup recovery progress (EXPDP/IMPDP/RMAN) 1. view the EXPDP/IMPDP progress 1. When you export data, if the data volume is large, some people may be anxious in the middle, but they may want to see how the progress is. You can see it using two views:
Col owner_name for a10col job_name for a20col operation for a10col job_mode for a10col state for
One switch command1 switch command usageUpdate the data file name to the data file name specified during image copy under rmanUpdate the data file name to the name specified by the set newname command.2. Prerequisites for using the switch commandRman must be connected to the target databaseWhen you switch tablespaces, datafiles, and tempfiles, these files must be offline.When you switch the entire database, the database cannot be open.3. NotesSwitch... to copy command for
Tags: Oracle training Oracle Tutorial Oracle video Oracle Video tutorial Oracle Database tutorialOracle Video Tutorial Goals Oracle Video tutorial, wind Brother this set of Oracle Tutorial Training learning Oracle Database Rman Backup Recovery Foundation, such as Rman role and architecture, Nocatalog and Catalog Intro
Oracle rman catalog backup and recovery, rmancatalog
1. Lost control fileStart the database to nomount: restore controlfile from autobackup/restore controlfile from '+ data/backup/contrlbak /...'-> Alter database mount-> open;2. Accidentally deleting data filesStart to mount status-> alter database datafile 7 offline->
; print:aA----------0Sql> print:bB----------1Sql> Print:cC----------1Sql> exec DBMS_BACKUP_RESTORE.NIDPROCESSCF (: a,:b);The PL/SQL process has completed successfully.Sql> print:aA----------1Sql> print:bB----------1sql> exec dbms_backup_restore.nidend;The PL/SQL process has completed successfully.Sql> select dbid from V$database;DBID----------3935589514After the successful modification of dbid, the parameter files, control files, data files and log files are recovered in sequence:
Sql>startup No
Run {Allocate channel C1 type disk;Allocate channel C2 type disk;Allocate channel C3 type disk;SQL ' alter system switch logfile ';SQL ' alter system switch logfile ';SQL ' alter system switch logfile ';SQL ' alter system archive log current ';Backup Incremental Level 0Format '/DATA/APP/RMANBACKUP/DB_FULL_%U.BKP 'Database plus archivelog;Release channel C1;Release channel C2;Release channel C3;}run{Set newname for datafile 1 to '/data/app/oradata/sour
Restore databases in different locations
Restore databases in different locations
Machine:
Select instance_name from v $ instance;
Select name from v $ database;
Select name from v $ datafile;
Log query mode:
Archive log list;
Shutdown immediate;
Startup mount;
Change the log archive mode:
Alter database archivelog;
Alter database open;
Alter system archive log current;
Select name from v $ archived_log;
Open Control file tracking:
Alter database backup
Machine A:
Select instance_name from V$instance;
Select name from V$database;
Select name from V$datafile;
Query log mode:
Archive log list;
Shutdown immediate;
startup Mount;
Change Log to archive mode:
ALTER DATABASE Archivelog;
ALTER DATABASE open;
Alter system archive log current;
Select name from V$archived_log;
To turn on control file tracking:
ALTER DATABASE backup Controlfile to trace;
To view the location of the trace file:
Show Parameter Use
User Managed Backup Recovery Diagnostic Collection
Note:
Log on to SQL * PLUS with SYSDBA permission for executionThe instance must be mounted or OPEN mode.Generate the result file: recovery_diagnostics.out (default location is/tmp)
----------------- Start ------------------Set echo onSet linesize 200 trimspool onCol name form a60Col status form a10Col dbname form a15Col member form a80Col inst_id form 999
One, backup operations
Standby set
1. Set up a backup tag
Backup Database tag= ' full_bak1′;
Note: Each tag must be unique, and the same token can be used for multiple backups to restore only the most recent backup.
2. Set the backup set size (all the results of one
bytes
Database mounted.
Ora-01157:cannot identify/lock data file 10-see DBWR trace file
This column more highlights: http://www.bianceng.cn/database/Oracle/
Ora-01110:data file: '/u01/app/oracle/oradata/prod/lx01.dbf '
07:54:15 sql> Select File#,error from V$recover_file;
file# ERROR
---------- -----------------------------------------------------------------
Ten FILE not FOUND
07:54:25 sql>
3) Recovery using
database location. % Oracle_home %/ora92/databaseOf course, you can also use run to flexibly define your backup.RMAN> run {> Allocate chennel d1 type disk; // Distribution Channel> Backup full database // full backup database> Include current controlfile // include the current controlfile> Format 'e: \ oracle \ orders \ db _ % d _ % s _ % p _ % t _ % T'; // backup
/rman/backup_lv0. SQLFi
5. Specify the crontab script$ Crontab-e30 20 *** sh/Data/script/rman/rman_backup.sh;
How does rman restore Incremental backup?
First, you must have a backup of level 0. Otherwise, no matter how many incremental backups are set, the
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.