55.RMAN的监控和调整

1.实现多通道备份

--备份run块
run{
allocate channel a1 type disk;
allocate channel a2 type disk;
backup database;
release channel a1;
release channel a2;
}

--监视备份和还原操作的进度
select opname,context,sofar,totalwork,
round(sofar/totalwork*100,2) "%_complete"
from v$session_longops
where opname like 'RMAN%'
and opname not like '%AGGREGATE%'
and totalwork != 0
and sofar <> totalwork;
OPNAME								    CONTEXT	 SOFAR	TOTALWORK %_complete
---------------------------------------------------------------- ---------- ---------- ---------- ----------
RMAN: aggregate input							  7	     0	   221858	   0
RMAN: full datafile backup						  1	175372	   221200      79.28


--确定服务器会话和rman通道之间的关系
--使用set command id命令在备份期间将某个进程与某个通道想关联
select s.sid, p.spid, s.client_info
from v$process p, v$session s
where p.addr = s.paddr
and client_info like 'rman%';

       SID SPID 	CLIENT_INFO
---------- ------------ --------------------
       142 5977 	rman channel=ORA_DISK_1

Elapsed: 00:00:00.00

--以下视图可用于监视备份和还原的性能
v$backup_sync_io
v$backup_async_io
--对于备份或还原存在以下各行
----每个数据文件对应一行
----一个聚集数据文件行
----每个备份片段对应一行

备份优化通道

优化rman备份性能

posted @ 2023-03-05 14:55  竹蜻蜓vYv  阅读(30)  评论(0编辑  收藏  举报