Enable/Disable Debug for Netapp SnapManager for SQL

Came across a rogue debug log that was generating 500mb of log every time the backup job ran. To initially alleviate the disk filling up Logging was disabled which has to be done via the Registry. I am using SnapManager version 6.0.0.1170

If using SnapManager for SQL 5.X, change the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Network Appliance\SnapManager for SQL Server\Server\EnableDebug 
Set to 1 to enable, 0 to disable.

In most cases, the SnapManager Service does NOT need to be restarted after setting this value. You DO need to close and reopen the SnapManager for SQL Management console GUI. The additional debug logs will be saved in a subdirectory of the configured ‘report’ directory called Debug [ServerName]. For example:
C:\Program Files\NetApp\SnapManager for SQL Server\Report\Debug [myserver1]

In case you are still using an OLDER SnapManager for SQL versions (1.x through 2.x), follow those steps: 
To enable debug logging for SMSQL, two steps are required:

1. In the Windows Registry, locate the value LoggingLevel in the subkey path 
HKEY_LOCAL_MACHINE\SOFTWARE\NetApp\SnapManager for SQL Server\Debug
Change the value data to 0x00000001 (1)

2. Next, the SnapManagerdebug.exe program must be executed and be a running process.

To disable debug logging, kill the running process SnapManagerDebug.exe from Windows Task Manager GUI, or Windows 2003 cli tasklist / tskill and/or change the value data of the above registry sub key back to the default of 0x00000000 (0)

Source

Netapp Support KB ID: 1011946 Version: 3.0 Published date: 01/31/2013

Create Standalone Oracle 10g Clone Database Using NetApp Snaps

Create a Flex Clone

  • Request networks to create a flex clone for the database volume
  • Get the name of the clone volume from networks

Mount the clone on the target server:

sudo su
vi /etc/fstab
nful0001-data:/vol/VOLUMEA_DATA /oradata/MYDB  nfs  
ping  nful0060-data
cd /oradata
mkdir MYDB
chown oracle:dba MYDB
mount /oradata/MYDB
exit

Check the volume is mounted correctly:

df -h

Create the dump directories:

cd $ORACLE_BASE/admin
mkdir MYDB
mkdir MYDB/bdump
mkdir MYDB/cdump
mkdir MYDB/adump
mkdir MYDB/udump

Create the pfile to point the spfile that is on the mounted volume, check pwd file:

cd $ORACLE_HOME/dbs
vi initMYDB1.ora
spfile='/oradata/MYDB/MYDB/spfileMYDB.ora'
ls /oradata/MYDB/MYDB/spfileMYDB.ora


--create symbolic link to the password file
cd $ORACLE_HOME/dbs
ln -s /oradata/MYDB/MYDB/orapwMYDB orapwMYDB1

Tidy up the tns entries:

Ensure that the db could not  connect to any live database by removing all tns entries to production database

Open in mount mode and disable all scheduler and dbms_jobs:

export ORACLE_SID=MYDB1
sqlplus / as sysdba
startup mount;
show parameter job_queue
alter system set job_queue_processes=0;

alter database open;
--(Recover db if neccessary)

Take a snap of the scheduler job status:

--disable all scheduler jobs

alter database open;
BEGIN
    DBMS_OUTPUT.ENABLE(9000000);
    FOR cur IN
        (SELECT 'BEGIN SYS.DBMS_SCHEDULER.STOP_JOB(JOB_NAME => ' || chr(39) || OWNER || '.' || JOB_NAME || chr(39) || ', FORCE => TRUE); END;' stmt,
        OWNER || '.' || JOB_NAME job_name
        FROM DBA_SCHEDULER_JOBS
        WHERE OWNER <> 'SYS')
    LOOP
        --DBMS_OUTPUT.PUT_LINE(cur.stmt);
        BEGIN
            EXECUTE IMMEDIATE(cur.stmt);
        EXCEPTION
        WHEN others THEN
            DBMS_OUTPUT.PUT_LINE('JOB NOT RUNNING ' || cur.job_name);
            --DBMS_OUTPUT.PUT_LINE(SQLERRM || ' CAUSE:' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
        END;
    END LOOP;
    FOR cur IN
        (SELECT 'BEGIN SYS.DBMS_SCHEDULER.DISABLE(NAME => ' || '''' || OWNER || '.' || JOB_NAME || '''' || ', FORCE => TRUE); END;' stmt,
        OWNER || '.' || JOB_NAME job_name
        FROM DBA_SCHEDULER_JOBS
        WHERE OWNER <> 'SYS')
    LOOP
        --DBMS_OUTPUT.PUT_LINE(cur.stmt);
        BEGIN
            EXECUTE IMMEDIATE(cur.stmt);
        EXCEPTION
        WHEN others THEN
            DBMS_OUTPUT.PUT_LINE('JOB NOT DISABLED ' || cur.job_name);
            --DBMS_OUTPUT.PUT_LINE(SQLERRM || ' CAUSE:' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
        END;
    END LOOP;
END;
/


--check if any job still running

NetApp Filer Snap Commands

#Create Snap
rsh $filer_host -n snap create $filer_volume $snap_name

#Delete Snap
rsh $filer_host -n snap delete $filer_volume $snap_name

#List Snap
rsh $filer_host -n snap list $filer_volume
eg rsh nful0000.dc.domain.net -n snap list PERF_DATA

#Restore Snap
rsh $filer_host snap restore -s $snap_name $filer_volume

Example for Hot Backup Snap:

export ORACLE_SID=MYDB
sqlplus /assysdba
alter database begin backup; ! sudo su
rsh tful0000-data -n snap createVOLUMEA DATA_BASELINE_FLEX
rsh tful0111-data -n snap createVOLUMEB_DATA BASELINE_FLEX
exit exit alter database end backup; exit