Oracle large table replication solution Stored Procedure Implementation

Source: Internet
Author: User

Implementation of the stored procedure for the Oracle large table replication solution:

  1. ProcedureMakePayPlayIraBakNewIs
  2. V_num number;
  3. Begin
  4. Vanceinfo. gmac_log_pro.setloginfo ('Makepayplayirabaknew',
  5. '123',
  6. '9',
  7. Sysdate,
  8. 'Makepayplayirabaknew execution start');
  9. V_num: = 0;
  10. Select Count(1)
  11. IntoV_num
  12. FromUser_tables
  13. WhereTable_name ='Gmac _ PAYPLAY_IRA_HIS';
  14. If (v_num> 0)Then
  15. ExecuteImmediate'Drop TABLE GMAC_PAYPLAY_IRA_HIS';
  16. EndIf;
  17. ExecuteImmediate'Create TABLE GMAC_PAYPLAY_IRA_HIS as select * FROM gmac_payplay';
  18. Vanceinfo. gmac_log_pro.setloginfo ('Makepayplayirabaknew',
  19. '123',
  20. '0',
  21. Sysdate,
  22. 'Makepayplayirabaknew execution completed successfully');
  23. Exception
  24. WhenOthersThen
  25. Vanceinfo. gmac_log_pro.setloginfo ('Makepayplayirabaknew',
  26. '123',
  27. '9',
  28. Sysdate,
  29. Substr (sqlerrm, 1,200 ));
  30. EndMakePayPlayIraBakNew;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.