channel如何解析和配置

发布时间:2021-11-10 13:52:25 作者:小新
来源:亿速云 阅读:459

这篇文章主要为大家展示了“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如何解析和配置”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!

推荐阅读:
  1. golang goroutine、channel和select
  2. SRX与Cisco之间的port-channel配置

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

channel

上一篇:怎么理解Mycat读写分离

下一篇:Django中的unittest应用是什么

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》