扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
(1)查看RMAN分配的各个通道的进程号
创新互联从2013年创立,是专业互联网技术服务公司,拥有项目网站设计制作、网站设计网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元沿河做网站,已为上家服务,为沿河各地企业和个人服务,联系电话:028-86922220
SQL
SELECT sid, spid, client_info
FROM v$process p, v$session s
WHERE p.addr = s.paddr
AND client_info LIKE '%rman%';
SID SPID CLIENT_INFO
113 15898 rman channel=ORA_DISK_1
119 15899 rman channel=ORA_DISK_2
120 15900 rman channel=ORA_DISK_3
117 15901 rman channel=ORA_DISK_4
(2)根据第(1)中得到的进程号,终止RMAN备份
注:这里既要kill 掉RMAN备份脚本的PID,?也要kill 掉RMAN中分配的各个通道的PID
[root@asmdb ~]# ps -ef | grep beq
oracle 1918 1 0 Jul10 ? 00:00:09 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 15790 1 0 08:53 ? 00:00:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 15892 15885 1 08:57 ? 00:00:00 oracleasmdb (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 15897 15885 1 08:57 ? 00:00:00 oracleasmdb (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 15898 15885 1 08:57 ? 00:00:00 oracleasmdb (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 15899 15885 2 08:57 ? 00:00:00 oracleasmdb (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 15900 15885 2 08:57 ? 00:00:00 oracleasmdb (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 15901 15885 5 08:57 ? 00:00:00 oracleasmdb (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
root 15903 15823 0 08:57 pts/3 00:00:00 grep beq
[root@asmdb ~]# kill -9 15898
[root@asmdb ~]# kill -9 15899
[root@asmdb ~]# kill -9 15900
[root@asmdb ~]# kill -9 15901
[root@asmdb ~]# ps -ef | grep rman
oracle 15885 15740 1 08:57 pts/2 00:00:02 rman target /
root 15926 15823 0 09:01 pts/3 00:00:00 grep rman
[root@asmdb ~]# kill -9 15885
rman备份的命令行终端的显示输出:
[oracle@asmdb ~]$ rman target /
Recovery Manager: Release 10.2.0.5.0 - Production on Mon Jul 29 08:57:22 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ASMDB (DBID=557978363)
RMAN backup database;
Starting backup at 29-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=113 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=119 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=120 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=117 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00002 name=+ASMDG01/asmdb/datafile/undotbs1.261.813779611
input datafile fno=00007 name=+ASMDG01/asmdb/datafile/spottbs.268.821100481
channel ORA_DISK_1: starting piece 1 at 29-JUL-13
channel ORA_DISK_2: starting full datafile backupset
channel ORA_DISK_2: specifying datafile(s) in backupset
input datafile fno=00001 name=+ASMDG01/asmdb/datafile/system.260.813779595
channel ORA_DISK_2: starting piece 1 at 29-JUL-13
channel ORA_DISK_3: starting full datafile backupset
channel ORA_DISK_3: specifying datafile(s) in backupset
input datafile fno=00003 name=+ASMDG01/asmdb/datafile/sysaux.262.813779621
input datafile fno=00004 name=+ASMDG01/asmdb/datafile/users.264.813779629
channel ORA_DISK_3: starting piece 1 at 29-JUL-13
channel ORA_DISK_4: starting full datafile backupset
channel ORA_DISK_4: specifying datafile(s) in backupset
input datafile fno=00005 name=+ASMDG01/asmdb/datafile/luroutest01.dbf
input datafile fno=00006 name=+ASMDG01/asmdb/datafile/spot01.dbf
channel ORA_DISK_4: starting piece 1 at 29-JUL-13
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/29/2013 08:58:20
RMAN-10038: database session for channel ORA_DISK_1 terminated unexpectedly
channel ORA_DISK_1 disabled, job failed on it will be run on another channel
RMAN-03009: failure of backup command on ORA_DISK_2 channel at 07/29/2013 08:58:20
RMAN-10038: database session for channel ORA_DISK_2 terminated unexpectedly
channel ORA_DISK_2 disabled, job failed on it will be run on another channel
RMAN-03009: failure of backup command on ORA_DISK_3 channel at 07/29/2013 08:58:20
RMAN-10038: database session for channel ORA_DISK_3 terminated unexpectedly
channel ORA_DISK_3 disabled, job failed on it will be run on another channel
Killed
[oracle@asmdb ~]$
[oracle@asmdb ~]$
(3)核实进程是否还存在
此时RMAN备份操作已经被终止。查看(1)中的SQL语句时,结果为空。
终止进程并不能结束备份,需要结束备份对应的job;
1、查看备份job
select job_name,state from dba_datapump_jobs;
2、在退出导出监视界面后,可以通过下面语句重新打开expdp界面
Expdp system/test ATTACH=system.export_job10 --第一步查出的job名称
3、结束job
Export kill_job
关闭所有服务可以,但是通常来说不需要关闭所有服务,只需要数据库不是open状态就可以了
一般做法是,用sqlplus sys/password@servicename as sysdba
sqlshutdown immediate
然后就可以进行冷备了
备份结束后
sqlstartup
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流