RMAN中set command id to 'rman'是什么意思?主要起什么作用?
解决方案 »
- oracle多实例?多数据库?
- oracle字符串中文内容替换的问题!
- 字符串操作求助
- 请问"绑定变量"是怎么一回事??
- 关于JOB自动运行,超级郁闷
- 小妹急问
- oracle启动失败,ORA-27154: post/wait create failed ORA-27300: OS system dependent operation:semget failed with status: 17 ORA-2
- 监听程序无法处理专用的服务器进程??
- oracle工具——sqlldr讨论,在线等待
- orcle导入dmp数据报错!重新把自己的本地数据库改为zhs16gbk字符集重新导入依然会报错!
- 这个为什么是第二范式?
- 创建控制文件Create Controlfile错误?
run{
allocate channel ch1 type disk;
set command id to 'rman';
copy datafile 4 to 'c:\rman\backup\users01.dbf.bk';
release channel ch1;
}
我就是不理解其中的set command id to 'rman'是什么意思,rman是我的恢复目录数据库.
这个命令我也之前也没见过,刚查了一文档,说:set command id to 'rman'; 这个命令之后,从v$session的CLIENT_INFO列可以看到这个值,即可以查看session是哪个命令的
In this method, you specify a command ID string in the RMAN backup script. You can then query V$SESSION.CLIENT_INFO for this string.To correlate a process with a channel during a backup:In each session, set the COMMAND ID to a different value after allocating the channels and then back up the desired object. For example, enter the following in session 1:
RMAN> RUN
{
ALLOCATE CHANNEL c1 TYPE sbt;
SET COMMAND ID TO 'sess1';
BACKUP DATABASE;
}
Set the command ID to a string such as sess2 in the job running in session 2:RUN
{
ALLOCATE CHANNEL c1 TYPE sbt;
SET COMMAND ID TO 'sess2';
BACKUP DATABASE;
}
Start a SQL*Plus session and then query the joined V$SESSION and V$PROCESS views while the RMAN job is executing. For example, enter:
SQL> SELECT SID, SPID, CLIENT_INFO
FROM V$PROCESS p, V$SESSION s
WHERE p.ADDR = s.PADDR
AND CLIENT_INFO LIKE '%id=sess%';
If you run the SET COMMAND ID command in the RMAN job, then the CLIENT_INFO column displays in the following format:id=command_id,rman channel=channel_id
For example, the following shows sample output: SID SPID CLIENT_INFO
---- ------------ ------------------------------
11 8358 id=sess1
15 8638 id=sess2
14 8374 id=sess1,rman channel=c1
9 8642 id=sess2,rman channel=c1
The rows that contain the string rman channel show the channel performing the backup. The remaining rows are for the connections to the target database.