4 Replies Latest reply: Apr 22, 2013 1:17 AM by Billy~Verreynne RSS

    Simulate ASM file damage

    PaolFili
      Hello.
      Any way to simulate a ASM datafile/controlfile damage on an open DB?
      The only solution to remove an ASM datafile/controlfile is shutdown the instance?
      Thanks

      Paolo
        • 1. Re: Simulate ASM file damage
          hm360
          Hi,

          Please create an alias to 'Control File'.

          ASMCMD> ls -lstL control01.ctl
          Type Redund Striped Time Sys Block_Size Blocks Bytes Space Name
          CONTROLFILE HIGH FINE APR 18 11:00:00 N 16384 1147 18792448 78643200 control01.ctl => +DATA01/ORCL/CONTROLFILE/Current.406.812390585
          ASMCMD>
          ASMCMD> rm control01.ctl
          ORA-15032: not all alterations performed
          ORA-15028: ASM file '+data01/orcl/control01.ctl' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)
          ASMCMD>
          ASMCMD> rm -f control01.ctl
          ORA-15032: not all alterations performed
          ORA-15028: ASM file '+data01/orcl/control01.ctl' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)
          ASMCMD>

          The alias file is deletable.

          ASMCMD> rmalias control01.ctl
          ASMCMD>
          ASMCMD> ls -lstL control01
          ASMCMD-8002: entry ' control01.ctl' does not exist in directory '+data01/orcl/'
          ASMCMD>



          The following is log at the time of the database start.

          SUCCESS: diskgroup DATA01 was mounted
          ORA-00210: ?????????????????????
          ORA-00202: ??????: '+DATA01/orcl/control01.ctl'
          ORA-17503: ksfdopn:2 ????+DATA01/orcl/control01.ctl????????????
          ORA-15173: entry 'control01.ctl' does not exist in directory 'orcl'
          ORA-205 signalled during: ALTER DATABASE MOUNT /* db agent *//* {1:18842:50457} */...
          • 2. Re: Simulate ASM file damage
            hm360
            Hi,

            Is a supplement

            'Data File' even if the alias can be removed, as it
            • 3. Re: Simulate ASM file damage
              KR10822864
              PaolFili wrote:
              Hello.
              Any way to simulate a ASM datafile/controlfile damage on an open DB?
              The only solution to remove an ASM datafile/controlfile is shutdown the instance?
              Thanks

              Paolo
              How do I ask a question on the forums?
              SQL and PL/SQL FAQ
              • 4. Re: Simulate ASM file damage
                Billy~Verreynne
                PaolFili wrote:
                Any way to simulate a ASM datafile/controlfile damage on an open DB?
                The only solution to remove an ASM datafile/controlfile is shutdown the instance?
                Why "simulate" damage? What is the intention?

                This type of testing should in any case be done on a dedicated test platform - where it is okay to toast the entire database, trash it, and restart all over again. In which case, simulated damage makes no sense. You want real damage in order to deal with real recovery issues.

                And for real damage, dd is one approach that works just fine - by writing zeros to an ASM disk. You can destroy the ASM header like that. Overwrite specific blocks. Etc.