监控dest3

 

[oracle@drucbpdb01:/home/oracle/script]$cat monitor_dest3.sh
/u01/app/oracle/product/19c/dbhome_1/bin/sqlplus -S / as sysdba << EOF
declare
st varchar2(200);
begin
SELECT STATUS into st FROM V\$ARCHIVE_DEST WHERE DEST_ID in (2);
if st <> 'VALID' then
execute immediate 'alter system set log_archive_dest_state_2=enable';
end if;
end;
/
exit;
EOF

上一篇:文件-上传


下一篇:力扣270场周赛第三题 从二叉树一个节点到另一个节点每一步的方向 题解