Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Article 3

$
0
0

Script to drop Standby Logfile


COL MEMBER FORMAT A48

SET SERVEROUTPUT ON SIZE 1000000


DECLARE
    lv_sql_1 VARCHAR2(400) := 'ALTER DATABASE DROP STANDBY LOGFILE GROUP ';
    lv_sqL   VARCHAR2(400) := NULL;

    CURSOR c_log IS
        select TO_CHAR(GROUP#) group_no,STATUS,TYPE,MEMBER,IS_RECOVERY_DEST_FILE
        from v$logfile
        where type ='STANDBY';

BEGIN
    FOR c_log_rec IN c_log LOOP
        lv_sql := lv_sql_1 ||c_log_rec.group_no;
        EXECUTE IMMEDIATE lv_sql ;
        DBMS_OUTPUT.PUT_LINE(lv_sql);
    END LOOP;
END;
/


Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>