Announcement Announcement Module
Collapse
No announcement yet.
Clean spring batch metadata tables Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clean spring batch metadata tables

    How can I clean up spring batch metadata tables?

    Thanks.

  • #2
    Originally posted by Tiago Melo View Post
    How can I clean up spring batch metadata tables?

    Thanks.
    * See issue BATCH-1747.
    * See RemoveSpringBatchHistoryTasklet @ https://github.com/arey/spring-batch-toolkit
    * Read blog entry (french): Sprint Batch s'auto-nettoie

    Comment


    • #3
      Originally posted by Tiago Melo View Post
      How can I clean up spring batch metadata tables?

      Thanks.
      I've used this with v2.1.7.RELEASE

      Code:
      DELETE FROM BATCH_STEP_EXECUTION_CONTEXT ;
      DELETE FROM BATCH_JOB_EXECUTION_CONTEXT ;
      DELETE FROM BATCH_STEP_EXECUTION ;
      DELETE FROM BATCH_JOB_EXECUTION ;
      DELETE FROM BATCH_JOB_PARAMS ;
      DELETE FROM BATCH_JOB_INSTANCE ;
      
      DELETE FROM BATCH_STEP_EXECUTION_SEQ ;
      DELETE FROM BATCH_JOB_EXECUTION_SEQ ;
      DELETE FROM BATCH_JOB_SEQ ;

      Comment


      • #4
        Originally posted by johnmmcparland View Post
        I've used this with v2.1.7.RELEASE

        Code:
        DELETE FROM BATCH_STEP_EXECUTION_CONTEXT ;
        DELETE FROM BATCH_JOB_EXECUTION_CONTEXT ;
        DELETE FROM BATCH_STEP_EXECUTION ;
        DELETE FROM BATCH_JOB_EXECUTION ;
        DELETE FROM BATCH_JOB_PARAMS ;
        DELETE FROM BATCH_JOB_INSTANCE ;
        
        DELETE FROM BATCH_STEP_EXECUTION_SEQ ;
        DELETE FROM BATCH_JOB_EXECUTION_SEQ ;
        DELETE FROM BATCH_JOB_SEQ ;

        That's it. Thanks!

        Comment


        • #5
          Originally posted by Tiago Melo View Post
          That's it. Thanks!
          Yikes I made a big mistake here...

          Code:
          DELETE FROM BATCH_STEP_EXECUTION_CONTEXT ;
          DELETE FROM BATCH_JOB_EXECUTION_CONTEXT ;
          DELETE FROM BATCH_STEP_EXECUTION ;
          DELETE FROM BATCH_JOB_EXECUTION ;
          DELETE FROM BATCH_JOB_PARAMS ;
          DELETE FROM BATCH_JOB_INSTANCE ;
          
          DELETE FROM BATCH_STEP_EXECUTION_SEQ ;
          DELETE FROM BATCH_JOB_EXECUTION_SEQ ;
          DELETE FROM BATCH_JOB_SEQ ;
          
          -- These are needed
          INSERT INTO BATCH_STEP_EXECUTION_SEQ values(0);
          INSERT INTO BATCH_JOB_EXECUTION_SEQ values(0);
          INSERT INTO BATCH_JOB_SEQ values(0);
          Those insertions at the end are very important! As I found out here

          Please do use the updated version!

          Comment


          • #6
            Originally posted by johnmmcparland View Post
            Yikes I made a big mistake here...

            Code:
            DELETE FROM BATCH_STEP_EXECUTION_CONTEXT ;
            DELETE FROM BATCH_JOB_EXECUTION_CONTEXT ;
            DELETE FROM BATCH_STEP_EXECUTION ;
            DELETE FROM BATCH_JOB_EXECUTION ;
            DELETE FROM BATCH_JOB_PARAMS ;
            DELETE FROM BATCH_JOB_INSTANCE ;
            
            DELETE FROM BATCH_STEP_EXECUTION_SEQ ;
            DELETE FROM BATCH_JOB_EXECUTION_SEQ ;
            DELETE FROM BATCH_JOB_SEQ ;
            
            -- These are needed
            INSERT INTO BATCH_STEP_EXECUTION_SEQ values(0);
            INSERT INTO BATCH_JOB_EXECUTION_SEQ values(0);
            INSERT INTO BATCH_JOB_SEQ values(0);
            Those insertions at the end are very important! As I found out here

            Please do use the updated version!
            Oh that's right. Thank you very much for your help!

            Cheers!

            Comment

            Working...
            X