分享更有价值
被信任是一种快乐

channel如何解析和配置

文章页正文上

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

相关推荐: POSTGRESQL10.3源码如何安装主从搭建

这篇文章将为大家详细讲解有关POSTGRESQL10.3源码如何安装主从搭建,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。一、下载POSTGRESQL源码安装包及主机配置https://www.postgresql.org/…

文章页内容下
赞(0) 打赏
版权声明:本站采用知识共享、学习交流,不允许用于商业用途;文章由发布者自行承担一切责任,与本站无关。
文章页正文下
文章页评论上

云服务器、web空间可免费试用

宝塔面板主机、支持php,mysql等,SSL部署;安全高速企业专供99.999%稳定,另有高防主机、不限制内容等类型,具体可咨询QQ:360163164,Tel同微信:18905205712

主机选购导航云服务器试用

登录

找回密码

注册