• Search

  • Pages

  • Archives

  • Categories

  • Meta

  • SharePlex – Repairing a Table with Copy

    02/01/14 3:39 PM

    This procedure is generally used only for very large tables when standard compare and repair can not be executed due to time or system resource constraints.  The instructions below will allow you to execute this procedure with the least amount of impact to the database, by minimizing the lock time required on the table.

    • Open 3 windows on the source system to expedite the process. This will enable you to minimize the amount of time the full table lock is held. With proper execution, the table lock can be less than 10 seconds.
    • In one window, create an export parameter file to export the table you want to synchronize. When complete, enter the export command but don’t hit the return key. The basic export command or data pump can be used.
      • noup / expdp parfile=exp.par &
    • In your second window, enter sqlplus from the command line. Enter the lock table command but do not hit return.
      • sqlplus / as sysdba
      • SQL>  lock table <table name> in exclusive mode;
    • In your third window, enter sp_ctrl and type in the flush command but do not hit return.
      • sp_ctrl
      • > flush <datasource>
    • You are now ready to start the procedure. All steps should be done as quickly as possible to reduce the lock time.
    1. Execute the lock table command in window two. If this times out, retry until successful.
    2. Execute flush command in window three.
    3. Start export command in window one.
    4. Return to window two and execute a commit.
    5. When export is completed, transfer dump file to target server, truncate the table, and import it.
    6. Start the post process.


    Author: Mark Bochinski, Senior SharePlex DBA, LeadThem Security





    Posted by bc-admin | in SharePlex | Comments Off on SharePlex – Repairing a Table with Copy

    Comments are closed.