网站建设资讯

NEWS

网站建设资讯

channel如何解析和配置

这篇文章主要为大家展示了“channel如何解析和配置”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“channel如何解析和配置”这篇文章吧。

网站设计制作、成都网站建设介绍好的网站是理念、设计和技术的结合。创新互联公司拥有的网站设计理念、多方位的设计风格、经验丰富的设计团队。提供PC端+手机端网站建设,用营销思维进行网站设计、采用先进技术开源代码、注重用户体验与SEO基础,将技术与创意整合到网站之中,以契合客户的方式做到创意性的视觉化效果。

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


分享文章:channel如何解析和配置
链接地址:http://cdweb.net/article/jhggio.html