以下脚本可以用于检测数据库当前是否有备份操作在执行中:
SELECT DECODE(os_backup.backup + rman_backup.backup, 0, ‘FALSE‘, ‘TRUE‘) backup
FROM (SELECT COUNT(*) backup FROM gv$backup WHERE status = ‘ACTIVE‘) os_backup,
(SELECT COUNT(*) backup
FROM gv$session
WHERE status = ‘ACTIVE‘
AND client_info like ‘%rman%‘) rman_backup;
原文地址:https://www.cnblogs.com/liang545621/p/9410657.html
时间: 2024-11-23 08:12:30