rman 随便看看备份-程序员宅基地

技术标签: 操作系统  数据库  

SQL> conn / as sysdba
Connected.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 21
Next log sequence to archive 23
Current log sequence 23
SQL> startup mount force
ORACLE instance started.

Total System Global Area 184549376 bytes
Fixed Size 1218412 bytes
Variable Size 79693972 bytes
Database Buffers 100663296 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL>
--怎么监控 备份的速率呢???
RMAN> backup as compressed backupset database;

Starting backup at 21-OCT-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
channel ORA_DISK_1: starting compressed full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/test/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_nnndf_TAG20111021T190507_7b2nh4s7_.bkp tag=TAG20111021T190507 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:06
channel ORA_DISK_1: starting compressed full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_ncsnf_TAG20111021T190507_7b2nm5bm_.bkp tag=TAG20111021T190507 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:06
Finished backup at 21-OCT-11

RMAN> alter database open;
database opened
RMAN>
---------------------- 特定路径
RMAN> run{
2> allocate channel c1 device type disk format '/export/home/oracle/db_%U';
3> backup as compressed backupset database;
4> backup current controlfile;
5> }
allocated channel: c1
channel c1: sid=157 devtype=DISK
Starting backup at 21-OCT-11
channel c1: starting compressed full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/test/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
channel c1: starting piece 1 at 21-OCT-11
channel c1: finished piece 1 at 21-OCT-11
piece handle=/export/home/oracle/db_09mpm9go_1_1 tag=TAG20111021T193552 comment=NONE
channel c1: backup set complete, elapsed time: 00:03:46
channel c1: starting compressed full datafile backupset
channel c1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel c1: starting piece 1 at 21-OCT-11
channel c1: finished piece 1 at 21-OCT-11
piece handle=/export/home/oracle/db_0ampm9nq_1_1 tag=TAG20111021T193552 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:07
Finished backup at 21-OCT-11

Starting backup at 21-OCT-11
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including current control file in backupset
channel c1: starting piece 1 at 21-OCT-11
channel c1: finished piece 1 at 21-OCT-11
piece handle=/export/home/oracle/db_0bmpm9o3_1_1 tag=TAG20111021T193947 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:03
Finished backup at 21-OCT-11
released channel: c1

RMAN>
---这个备份 并没备份到D盘 搞错了 是lINUX
---标记tag 时间 duration 备份大小 maxsetsize 保存策略
backup tag='test' duration 00:02 maxsetsize 700M database
RMAN> backup tag='test' duration 00:02 maxsetsize 700M database;

Starting backup at 21-OCT-11
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=00001 name=/u01/app/oracle/oradata/test/system01.dbf
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 10/21/2011 19:50:23
ORA-19591: backup aborted because job time exceeded duration time

RMAN>
--10g 有这个参数 以前的 要注意
backup database keep until time ='sysdate+10'
RMAN> backup database keep until time ='sysdate+10' logs;

Starting backup at 21-OCT-11
using channel ORA_DISK_1
backup will be obsolete on date 31-OCT-11
archived logs required to recover from this backup will expire when this backup expires
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/test/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 10/21/2011 20:09:49
ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 10/21/2011 20:09:51
ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes
--本实验失败
-- keep forever; keep until time ='sysdate+10'
-- validate
RMAN> backup validate database ;

Starting backup at 21-OCT-11
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=00001 name=/u01/app/oracle/oradata/test/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 21-OCT-11

RMAN> list backup;
RMAN>
--没有真正的备份数据库

-- skip readonly skip offline skipp inaccessible
-- backup database force
backup validate database keep until time='sysdate+10';
--只备份新加的
backup database not backed up;
RMAN> backup database not backed up;

Starting backup at 21-OCT-11
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=00001 name=/u01/app/oracle/oradata/test/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_nnndf_TAG20111021T201651_7b2ronbf_.bkp tag=TAG20111021T201651 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05

channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_ncsnf_TAG20111021T201651_7b2rqsdj_.bkp tag=TAG20111021T201651 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 21-OCT-11
--备份特定时间内美哟备份的文件
backup database not backed up since time='sysdate-2';
RMAN> backup database not backed up since time='sysdate-2';

Starting backup at 21-OCT-11
using channel ORA_DISK_1
skipping datafile 1; already backed up on 21-OCT-11
skipping datafile 2; already backed up on 21-OCT-11
skipping datafile 3; already backed up on 21-OCT-11
skipping datafile 4; already backed up on 21-OCT-11
Finished backup at 21-OCT-11
---------------------以上都是脱机备份
----------------------下面联机备份
backup archivelog all delete input;
backup archivelog from sequence 11 delete input;
backup archivelog all delete input until time 'sysdate-1';
RMAN> backup archivelog all delete input;

Starting backup at 21-OCT-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=13 recid=1 stamp=764429562
input archive log thread=1 sequence=14 recid=2 stamp=764429563
input archive log thread=1 sequence=15 recid=3 stamp=764429567
input archive log thread=1 sequence=16 recid=4 stamp=764429738
input archive log thread=1 sequence=17 recid=5 stamp=764445613
input archive log thread=1 sequence=18 recid=6 stamp=764447490
input archive log thread=1 sequence=19 recid=7 stamp=764719188
input archive log thread=1 sequence=20 recid=8 stamp=764719928
input archive log thread=1 sequence=21 recid=9 stamp=764795225
input archive log thread=1 sequence=22 recid=10 stamp=764809621
input archive log thread=1 sequence=23 recid=11 stamp=765140867
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_annnn_TAG20111021T202441_7b2s4cq4_.bkp tag=TAG20111021T202441 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_13/o1_mf_1_13_79dxzt8m_.arc recid=1 stamp=764429562
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_13/o1_mf_1_14_79dxzv25_.arc recid=2 stamp=764429563
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_13/o1_mf_1_15_79dxzzos_.arc recid=3 stamp=764429567
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_13/o1_mf_1_16_79dy57v8_.arc recid=4 stamp=764429738
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_13/o1_mf_1_17_79ffo4r0_.arc recid=5 stamp=764445613
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_13/o1_mf_1_18_79fhj1th_.arc recid=6 stamp=764447490
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_16/o1_mf_1_19_79ortm16_.arc recid=7 stamp=764719188
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_16/o1_mf_1_20_79oskrto_.arc recid=8 stamp=764719928
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_17/o1_mf_1_21_79r32rbc_.arc recid=9 stamp=764795225
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_17/o1_mf_1_22_79rk4nl3_.arc recid=10 stamp=764809621
archive log filename=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2011_10_21/o1_mf_1_23_7b2nn2x3_.arc recid=11 stamp=765140867
Finished backup at 21-OCT-11
---备份级备份


RMAN> backup backupset all;

Starting backup at 21-OCT-11
using channel ORA_DISK_1
input backupset count=17 stamp=765145012 creation_time=21-OCT-11
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: backup piece /u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_nnndf_TAG20111021T201651_7b2ronbf_.bkp
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_nnndf_TAG20111021T201651_7b2skstl_.bkp comment=NONE
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
input backupset count=18 stamp=765145077 creation_time=21-OCT-11
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: backup piece /u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_ncsnf_TAG20111021T201651_7b2rqsdj_.bkp
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_ncsnf_TAG20111021T201651_7b2smkqd_.bkp comment=NONE
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
input backupset count=19 stamp=765145482 creation_time=21-OCT-11
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: backup piece /u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_annnn_TAG20111021T202441_7b2s4cq4_.bkp
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_annnn_TAG20111021T202441_7b2smnkt_.bkp comment=NONE
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 21-OCT-11
-- 差异备份...
backup incremental level=1 database;
RMAN> backup incremental level=1 database;

Starting backup at 21-OCT-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/test/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_nnnd1_TAG20111021T203537_7b2srt76_.bkp tag=TAG20111021T203537 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_ncsn1_TAG20111021T203537_7b2stych_.bkp tag=TAG20111021T203537 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 21-OCT-11

--
backup incremental level=2 cumulative database;
RMAN> backup incremental level=2 cumulative database;

Starting backup at 21-OCT-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 2 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/test/system01.dbf
skipping datafile 00001 because it has not changed
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
skipping datafile 00004 because it has not changed
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
skipping datafile 00003 because it has not changed
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
skipping datafile 00002 because it has not changed
channel ORA_DISK_1: backup cancelled because all files were skipped
channel ORA_DISK_1: starting incremental level 2 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_ncsn2_TAG20111021T204022_7b2t1rnr_.bkp tag=TAG20111021T204022 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 21-OCT-11

--增量的更新备份, script
run{
recover copy of database with tag 'test_incr';
backup incremental level 1 for recover of copy with tag 'test_incr' database;
}
-------------------------------------------------------------------------------------------
RMAN> run{
2> recover copy of database with tag 'test_incr';
3> backup incremental level 1 for recover of copy with tag 'test_incr' database;
4> }
Starting recover at 21-OCT-11
using channel ORA_DISK_1
no copy of datafile 1 found to recover
no copy of datafile 2 found to recover
no copy of datafile 3 found to recover
no copy of datafile 4 found to recover
Finished recover at 21-OCT-11
Starting backup at 21-OCT-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/test/system01.dbf
skipping datafile 00001 because it has not changed
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
skipping datafile 00004 because it has not changed
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
skipping datafile 00003 because it has not changed
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
skipping datafile 00002 because it has not changed
channel ORA_DISK_1: backup cancelled because all files were skipped
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_ncsn1_TAG20111021T205024_7b2tnl94_.bkp tag=TAG20111021T205024 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 21-OCT-11
--以上什么备份 都木有的时候
backup database;
RMAN> backup database;
Starting backup at 21-OCT-11
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=00001 name=/u01/app/oracle/oradata/test/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_nnndf_TAG20111021T205108_7b2toxfy_.bkp tag=TAG20111021T205108 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_ncsnf_TAG20111021T205108_7b2tqqg4_.bkp tag=TAG20111021T205108 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:06
Finished backup at 21-OCT-11
RMAN> backup copy of database;
Stating backup at 21-OCT-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: including datafile copy of datafile 00001 in backupset
input filename=/u01/app/oracle/flash_recovery_area/TEST/datafile/o1_mf_system_7b2t9tx8_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00004 in backupset
input filename=/u01/app/oracle/flash_recovery_area/TEST/datafile/o1_mf_users_7b2tc04r_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00003 in backupset
input filename=/u01/app/oracle/flash_recovery_area/TEST/datafile/o1_mf_sysaux_7b2td1lz_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00002 in backupset
input filename=/u01/app/oracle/flash_recovery_area/TEST/datafile/o1_mf_undotbs1_7b2tdjvn_.dbf
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_nnndf__7b2tt832_.bkp comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:06
Finished backup at 21-OCT-11
RMAN> run{
2> recover copy of database with tag 'test_incr';
3> backup incremental level 1 for recover of copy with tag 'test_incr' database;
4> }
Starting recover at 21-OCT-11
using channel ORA_DISK_1
no copy of datafile 1 found to recover
no copy of datafile 2 found to recover
no copy of datafile 3 found to recover
no copy of datafile 4 found to recover
Finished recover at 21-OCT-11
Starting backup at 21-OCT-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/test/system01.dbf
skipping datafile 00001 because it has not changed
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
skipping datafile 00004 because it has not changed
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
skipping datafile 00003 because it has not changed
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
skipping datafile 00002 because it has not changed
channel ORA_DISK_1: backup cancelled because all files were skipped
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_ncsn1_TAG20111021T205508_7b2txjk0_.bkp tag=TAG20111021T205508 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:06
Finished backup at 21-OCT-11
RMAN>
--增量备份
---------------------------------------------------------------------------------------------
--基本备份
--backup incremental level=0 database;
RMAN> backup incremental level=0 database;
Starting backup at 21-OCT-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/test/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_nnnd0_TAG20111021T205624_7b2tzsgh_.bkp tag=TAG20111021T205624 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-OCT-11
channel ORA_DISK_1: finished piece 1 at 21-OCT-11
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2011_10_21/o1_mf_ncsn0_TAG20111021T205624_7b2v1moh_.bkp tag=TAG20111021T205624 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:06
Finished backup at 21-OCT-11
-----------------------文件跟踪---------------------------------------------------------------
alter database enable block change tracking using file '/u01/app/oracle/test.fill'
SQL> alter database enable block change tracking using file '/u01/app/oracle/test.fill'
2 ;
Database altered.
SQL>
select status from v$block_change_tracking
SQL> select status from v$block_change_tracking;
STATUS
-------
ENABLED
--backup validate check logical database;
RMAN> backup validate check logical database;
Starting backup at 21-OCT-11
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=00001 name=/u01/app/oracle/oradata/test/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/test/users01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/test/undotbs01.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 21-OCT-11
--backup database not backed up since time='sysdate-2';
RMAN> backup database not backed up since time='sysdate-2';
Starting backup at 21-OCT-11
using channel ORA_DISK_1
skipping datafile 1; already backed up on 21-OCT-11
skipping datafile 2; already backed up on 21-OCT-11
skipping datafile 3; already backed up on 21-OCT-11
skipping datafile 4; already backed up on 21-OCT-11
Finished backup at 21-OCT-11
RMAN>
--===============================================================
Oracle backup常用命令总结备忘-----------------------------------

1.设置备份标记
backup database tag='full_bak1';
注:每个标记必须唯一,相同的标记可以用于多个备份只还原最新的备份。

2.设置备份集大小(一次备份的所有结果为一个备份集,要注意备份集大小)
backup database maxsetsize=100m tag='datafile1';
注:maxsetsize限定备份集的大小。所以必须大于数据库总数据文件的大小,否则会报错。

RMAN-06183: datafile or datafile copy larger than MAXSETSIZE: file# 1 /data/oradata/system01.dbf

3.设置备份片大小(磁带或文件系统限制)
run {
allocate channel c1 type disk maxpicecsize 100m format '/data/backup/full_0_%U_%T';
backup database tag='full_0'; release channel c1;
}

Oracle backup常用命令总结备忘可以在allocate子句中设定每个备份片的大小,以达到磁带或系统限制。
也可以在configure中设置备份片大小。

Configure channel device type disk maxpiecesize 100 m;
configure channel device type disk clear;

4.备份集的保存策略

backup database keep forever; --永久保留备份文件
backup database keep until time='sysdate+30'; --保存备份30天 --这个始终不成功

5.重写configure exclude命令
backup databas noexclude keep forever tag='test backup'; --这个始终不成功

6.检查数据库错误
backup validate database;

使用RMAN来扫描数据库的物理/逻辑错误,并不执行实际备份。

7.跳过脱机,不可存取或只读文件
backup database skip readonly; --可以
backup database skip offline;
backup database skip inaccessible;
backup database ship readonly skip offline ship inaccessible;

8.强制备份
backup database force; 9.基于上次备份时间备份数据文件

1>只备份添加的新数据文件
backup database not backed up;
2>备份"在限定时间周期内"没有被备份的数据文件
backup database not backed up since time='sysdate-2';

10.Oracle backup常用命令总结备忘中备份操作期间检查逻辑错误
backup check logical database;
backup validate check logical database;

11.生成备份副本
backup database copies=2;

12.备份控制文件
backup database device type disk includ current controlfile;

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9879835/viewspace-1055865/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9879835/viewspace-1055865/

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/cntkcn4698/article/details/100301301

智能推荐

python opencv resize函数_python opencv 等比例调整(缩放)图片分辨率大小代码 cv2.resize()...-程序员宅基地

文章浏览阅读1.3k次。# -*- coding: utf-8 -*-"""@File : 200113_等比例调整图像分辨率大小.py@Time : 2020/1/13 13:38@Author : Dontla@Email : [email protected]@Software: PyCharm"""import cv2def img_resize(image):height, width = image...._opencv小图等比例缩放

【OFDM、OOK、PPM、QAM的BER仿真】绘制不同调制方案的误码率曲线研究(Matlab代码实现)-程序员宅基地

文章浏览阅读42次。对于这些调制技术的误码率(BER)研究是非常重要的,因为它们可以帮助我们了解在不同信道条件下系统的性能表现。通过以上步骤,您可以进行OFDM、OOK、PPM和QAM的误码率仿真研究,并绘制它们的误码率曲线,以便更好地了解它们在不同信道条件下的性能特点。针对这些调制技术的BER研究是非常重要的,可以帮助我们更好地了解这些技术在不同信道条件下的性能表现,从而指导系统设计和优化。6. 分析结果:根据误码率曲线的比较,分析每种调制方案在不同信噪比条件下的性能,包括其容忍的信道条件和适用的应用场景。_ber仿真

【已解决】Vue的Element框架,日期组件(el-date-picker)的@change事件,不会触发。_el-date-picker @change不触发-程序员宅基地

文章浏览阅读2.5w次,点赞3次,收藏3次。1、场景照抄官方的实例,绑定了 myData.Age 这个值。实际选择某个日期后,从 vuetool(开发工具)看,值已经更新了,但视图未更新。2、尝试绑定另一个值: myData,可以正常的触发 @change 方法。可能是:值绑定到子对象时,组件没有侦测到。3、解决使用 @blur 代替 @change 方法。再判断下 “值有没有更新” 即可。如有更好的方法,欢迎评论!..._el-date-picker @change不触发

PCL学习:滤波—Projectlnliers投影滤波_projectinliers-程序员宅基地

文章浏览阅读1.5k次,点赞2次,收藏8次。Projectlnliersclass pcl: : Projectlnliers< PointT >类 Projectlnliers 使用一个模型和一组的内点的索引,将内点投影到模型形成新的一个独立点云。关键成员函数 void setModelType(int model) 通过用户给定的参数设置使用的模型类型 ,参数 Model 为模型类型(见 mo..._projectinliers

未处理System.BadImageFormatException”类型的未经处理的异常在 xxxxxxx.exe 中发生_“system.badimageformatexception”类型的未经处理的异常在 未知模块。 -程序员宅基地

文章浏览阅读2.4k次。“System.BadImageFormatException”类型的未经处理的异常在 xxxx.exe 中发生其他信息: 未能加载文件或程序集“xxxxxxx, Version=xxxxxx,xxxxxxx”或它的某一个依赖项。试图加载格式不正确的程序。此原因是由于 ” 目标程序的目标平台与 依赖项的目标编译平台不一致导致,把所有的项目都修改到同一目标平台下(X86、X64或AnyCPU)进行编译,一般即可解决问题“。若果以上方式不能解决,可采用如下方式:右键选择配置管理器,在这里修改平台。_“system.badimageformatexception”类型的未经处理的异常在 未知模块。 中发生

PC移植安卓---2018/04/26_电脑软件移植安卓-程序员宅基地

文章浏览阅读2.4k次。记录一下碰到的问题:1.Assetbundle加载问题: 原PC打包后的AssetBundle导入安卓工程后,加载会出问题。同时工程打包APK时,StreamingAssets中不能有中文。解决方案: (1).加入PinYinConvert类,用于将中文转换为拼音(多音字可能会出错,例如空调转换为KongDiao||阿拉伯数字不支持,如Ⅰ、Ⅱ、Ⅲ、Ⅳ(IIII)、Ⅴ、Ⅵ、Ⅶ、Ⅷ、Ⅸ、Ⅹ..._电脑软件移植安卓

随便推点

聊聊线程之run方法_start 是同步还是异步-程序员宅基地

文章浏览阅读2.4k次。话不多说参考书籍 汪文君补充知识:start是异步,run是同步,start的执行会经过JNI方法然后被任务执行调度器告知给系统内核分配时间片进行创建线程并执行,而直接调用run不经过本地方法就是普通对象执行实例方法。什么是线程?1.现在几乎百分之百的操作系统都支持多任务的执行,对计算机来说每一个人物就是一个进程(Process),在每一个进程内部至少要有一个线程实在运行中,有时线..._start 是同步还是异步

制作非缘勿扰页面特效----JQuery_单击标题“非缘勿扰”,<dd>元素中有id属性的<span>的文本(主演、导演、标签、剧情-程序员宅基地

文章浏览阅读5.3k次,点赞9次,收藏34次。我主要用了层次选择器和属性选择器可以随意选择,方便简单为主大体CSS格式 大家自行构造网页主体<body> <div class='main' > <div class='left'> <img src="images/pic.gif" /> <br/><br/> <img src="images/col.gif" alt="收藏本片"/&_单击标题“非缘勿扰”,元素中有id属性的的文本(主演、导演、标签、剧情

有了这6款浏览器插件,浏览器居然“活了”?!媳妇儿直呼“大开眼界”_浏览器插件助手-程序员宅基地

文章浏览阅读901次,点赞20次,收藏23次。浏览器是每台电脑的必装软件,去浏览器搜索资源和信息已经成为我们的日常,我媳妇儿原本也以为浏览器就是上网冲浪而已,哪有那么强大,但经过我的演示之后她惊呆了,直接给我竖起大拇指道:“原来浏览器还能这么用?大开眼界!今天来给大家介绍几款实用的浏览器插件,学会之后让你的浏览器“活过来”!_浏览器插件助手

NumPy科学数学库_数学中常用的环境有numpy-程序员宅基地

文章浏览阅读101次。NumPy是Python中最常用的科学数学计算库之一,它提供了高效的多维数组对象以及对这些数组进行操作的函数NumPy的核心是ndarray(N-dimensional array)对象,它是一个用于存储同类型数据的多维数组Numpy通常与SciPy(Scientific Python)和 Matplotlib(绘图库)一起使用,用于替代MatLabSciPy是一个开源的Python算法库和数学工具包;Matplotlib是Python语言及其Numpy的可视化操作界面'''_数学中常用的环境有numpy

dind(docker in docker)学习-程序员宅基地

文章浏览阅读1.1w次。docker in docker说白了,就是在docker容器内启动一个docker daemon,对外提供服务。优点在于:镜像和容器都在一个隔离的环境,保持操作者的干净环境。想到了再补充 :)一:低版本启动及访问启动1.12.6-dinddocker run --privileged -d --name mydocker docker:1.12.6-dind在其他容器访问d..._dind

推荐文章

热门文章

相关标签