溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

channel如何解析和配置

發(fā)布時間:2021-11-10 13:52:25 來源:億速云 閱讀:424 作者:小新 欄目:關系型數(shù)據(jù)庫

這篇文章主要為大家展示了“channel如何解析和配置”,內容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領大家一起研究并學習一下“channel如何解析和配置”這篇文章吧。

RMAN channel是指RMAN和數(shù)據(jù)庫server session的連接。RMAN本身不會做備份還原操作,當我們連接RMAN的時候,RMAN會在目標數(shù)據(jù)庫上分配server sessions。channel把數(shù)據(jù)讀取到PGA,經過處理后寫到設備中。大多數(shù)RMAN命令都是channels在執(zhí)行。
在配置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如何解析和配置”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注億速云行業(yè)資訊頻道!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經查實,將立刻刪除涉嫌侵權內容。

AI