您好,登錄后才能下訂單哦!
這篇文章主要為大家展示了“channel如何解析和配置”,內容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領大家一起研究并學習一下“channel如何解析和配置”這篇文章吧。
RMAN channel是指RMAN和數據庫server session的連接。RMAN本身不會做備份還原操作,當我們連接RMAN的時候,RMAN會在目標數據庫上分配server sessions。channel把數據讀取到PGA,經過處理后寫到設備中。大多數RMAN命令都是channels在執行。
在配置channel的時候,如果在次配置channel,那么以前的channel配置會被覆蓋
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2G;
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2 G;
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/%U';
old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2 G;
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/%U';
new RMAN configuration parameters are successfully stored
在默認情況下,RMAN只會為一個磁盤分配一個channel處理所有操作。
也可以使用allocate channel指定channel
比如運行腳本
RUN
[oracle@lzl ~]$ cat rman.script
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE DISK format '/home/oracle/c1.bakset';
BACKUP TABLESPACE users;
ALLOCATE CHANNEL c2 DEVICE TYPE DISK format '/home/oracle/c2.bakset';
BACKUP spfile;
}
指定了兩channel處理兩個任務
RMAN> @/home/oracle/rman.script
RMAN> RUN
2> {
3> ALLOCATE CHANNEL c1 DEVICE TYPE DISK format '/home/oracle/c1.bakset';
4> BACKUP TABLESPACE users;
5> ALLOCATE CHANNEL c2 DEVICE TYPE DISK format '/home/oracle/c2.bakset';
6> BACKUP spfile;
7> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=1 device type=DISK
Starting backup at 2017-07-23 23:49:58
channel c1: starting datafile copy
input datafile file number=00004 name=/u01/app/oracle/oradata/test/users01.dbf
output file name=/home/oracle/c1.bakset tag=TAG20170723T234958 RECID=2 STAMP=950140201
channel c1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 2017-07-23 23:50:01
allocated channel: c2
channel c2: SID=42 device type=DISK
Starting backup at 2017-07-23 23:50:02
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel c1: starting piece 1 at 2017-07-23 23:50:02
RMAN-03009: failure of backup command on c1 channel at 07/23/2017 23:50:02
ORA-19504: failed to create file "/home/oracle/c1.bakset"
ORA-27038: created file already exists
Additional information: 1
channel c1 disabled, job failed on it will be run on another channel
channel c2: starting full datafile backup set
channel c2: specifying datafile(s) in backup set
including current SPFILE in backup set
channel c2: starting piece 1 at 2017-07-23 23:50:02
channel c2: finished piece 1 at 2017-07-23 23:50:03
piece handle=/home/oracle/c2.bakset tag=TAG20170723T235002 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-07-23 23:50:03
released channel: c1
released channel: c2
RMAN> **end-of-file**
[oracle@lzl ~]$ ls -lrth *.bakset
-rw-r----- 1 oracle oinstall 409M Jul 23 23:50 c1.bakset
-rw-r----- 1 oracle oinstall 96K Jul 23 23:50 c2.bakset
以上是“channel如何解析和配置”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注億速云行業資訊頻道!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。