Document ID:        2009.1
Subject:            HOW TO EXPORT YOUR DATABASE BYPASSING A CORRUPT TABLE
Last Modified:      23 December  1992
Author:             Ellen Tafeen                                                                


________________________________________________________________________________

Exports are a key ingredient to any backup and recovery methodology.
However in certain unusual circumstances a corrupt table will prevent
you from performing this important task. Below you'll find a procedure
that will allow you to export your database bypassing a corrupt table.
For the sake of illustration, let's assume the table in error is
named EMPLOYEE:

1. Edit the file EXPVEW.SQL

2. Modify the 'CREATE VIEW EXUTAB' statement by adding

          and o$.name != 'EMPLOYEE'

   For example,

   CREATE VIEW exutab (objid, name, owner, ownerid, tablespace,
                       fileno, blockno, audit$, comment$,
                       clusterflag, mtime, modified, pctfree$,
                       pctused$, initrans, maxtrans) AS
       SELECT o$.obj#,o$.name, u$.name, o$.owner#, ts$.name, t$.file#,
              t$.block#, t$.audit$, c$.comment$, NVL(t$.clu#, 0),
              o$.mtime, t$.modified, t$.pctfree$,
              t$.pctused$, t$.initrans, t$.maxtrans
       FROM sys.tab$ t$, sys.obj$ o$, sys.ts$ ts$, sys.user$ u$,
            sys.com$ c$
       WHERE  t$.obj# = o$.obj# and t$.ts# = ts$.ts# and
              u$.user# = o$.owner# and o$.obj# = c$.obj#(+)
              and c$.col#(+) is null
              and o$.name != 'EMPLOYEE'

3. Connect to SQLDBA as SYS and rerun the EXPVEW sql script

          sqldba>@expvew

4. Execute your normal database export procedure. Please note the
   following export messages:

          About to export specified tables ...
          EXP-00011:EMPLOYEE does not exist
          . exporting table  .....

5. Once your database has exported successfully be sure to remove
   all modifications to the EXUTAB view and once again rerun the
   script EXPVEW.