1. 程式人生 > 實用技巧 >OracleDBA職責—備份與恢復技術—RMAN4

OracleDBA職責—備份與恢復技術—RMAN4

RMAN之手動分配並行通道

RMAN之手動分配並行通道
1. 檢視資料檔案臨時檔案位置
2.手動分配通道
3.並行度為3如何設定toc

1. 檢視資料檔案臨時檔案位置

RMAN> report schema;

Report of database schema for database with db_unique_name PROE

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    750      SYSTEM               ***     /u01/app/oracle/oradata/proe/system01.dbf
2    600      SYSAUX               ***     /u01/app/oracle/oradata/proe/sysaux01.dbf
3    90       UNDOTBS1             ***     /u01/app/oracle/oradata/proe/undotbs01.dbf
4    6        USERS                ***     /u01/app/oracle/oradata/proe/users01.dbf
5    346      EXAMPLE              ***     /u01/app/oracle/oradata/proe/example01.dbf
6    20       TEST_1               ***     /u01/app/oracle/oradata/proe/test_1.dbf
7    100      TBS_TRAN             ***     /u01/app/oracle/oradata/proe/tbs_tran01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    29       TEMP                 32767       /u01/app/oracle/oradata/proe/temp01.dbf

2.手動分配通道

RMAN> run{
2> allocate channel ch1 device type disk format '/u01/app/backup/tbs_%U';
3> backup tablespace TBS_TRAN;
4> release channel ch1;
5> }

allocated channel: ch1
channel ch1: SID=1144 device type=DISK

Starting backup at 10-AUG-20
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/u01/app/oracle/oradata/proe/tbs_tran01.dbf
channel ORA_DISK_1: starting piece 1 at 10-AUG-20
channel ORA_DISK_1: finished piece 1 at 10-AUG-20
piece handle=/u01/app/oracle/fast_recovery_area/PROE/backupset/2020_08_10/o1_mf_nnndf_TAG20200810T140602_hm1rybq5_.bkp tag=TAG20200810T140602 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-AUG-20

3.並行度為3如何設定

#規劃一下資料檔案的編號給哪個通道執行

RMAN> run{
2> allocate channel ch1 device type disk format '/u01/app/backup1/bak1_%U';
3> allocate channel ch2 device type disk format '/u01/app/backup2/bak2_%U';
4> allocate channel ch3 device type disk format '/u01/app/backup3/bak3_%U';
5> backup 
6> (datafile 1 channel ch1)
7> (datafile 2,3 channel ch2)
8> (datafile 4,5,7,8,9,14 channel ch3);
9> release channel ch1;
10> release channel ch2;
11> release channel ch3;
12> }


來自為知筆記(Wiz)