locked
show msg on error RRS feed

  • Question

  • hi,

    i have create a ssis package which loads data from flat files to table

    consider  user execute this package one time  data is loaded from file to table

    but if user again execute this package i need some pop up generated that "You Have Allready Migrate the Package" 

    Friday, July 13, 2012 8:50 AM

Answers

  • In my opinion, it's a bad idea to let users run SSIS packages. This tool is designed to run in the background doing ETL stuff. For user interaction, you need .NET applications.

    That being said, your requirement can be solved with a .NET script task. Check if the file exists or some other parameter and give a message box if needed. Then set some flag that indicates the rest of the package shouldn't run and use this variable on your precedence constraints.

    This will only work when the user executes the package in BIDS. In all other cases, there's no possibility for user interaction!


    MCTS, MCITP - Please mark posts as answered where appropriate.

    • Proposed as answer by Raunak J Friday, July 13, 2012 10:09 AM
    • Marked as answer by Eileen Zhao Thursday, July 19, 2012 3:33 AM
    Friday, July 13, 2012 9:22 AM
  • Hi,

    a. SSIS is not an end-user interactive tool like MS-Office; it was designed to run in a server as a background process, not on the end-user

    desktop in an interactive way.

    b. Users shouldn't be launching packages, they should be triggered by SQL Agent or by SQL triggers or some other external condition.

    c. The proper way would be to send an email to the end-user stating that his file was already processed.


    Sebastian Sajaroff Senior DBA Pharmacies Jean Coutu

    • Marked as answer by Eileen Zhao Thursday, July 19, 2012 3:34 AM
    Friday, July 13, 2012 12:00 PM

All replies

  • Perhaps just delete/copy that file into another folder.... and then a package will not be executed.

    Best Regards,Uri Dimant SQL Server MVP,http://sqlblog.com/blogs/uri_dimant/


    Friday, July 13, 2012 9:14 AM
  • hi,

    u r right but,

    my requirement is need to display pop up msg when user execute same package second time, this is possible in ssis

    Friday, July 13, 2012 9:20 AM
  • In my opinion, it's a bad idea to let users run SSIS packages. This tool is designed to run in the background doing ETL stuff. For user interaction, you need .NET applications.

    That being said, your requirement can be solved with a .NET script task. Check if the file exists or some other parameter and give a message box if needed. Then set some flag that indicates the rest of the package shouldn't run and use this variable on your precedence constraints.

    This will only work when the user executes the package in BIDS. In all other cases, there's no possibility for user interaction!


    MCTS, MCITP - Please mark posts as answered where appropriate.

    • Proposed as answer by Raunak J Friday, July 13, 2012 10:09 AM
    • Marked as answer by Eileen Zhao Thursday, July 19, 2012 3:33 AM
    Friday, July 13, 2012 9:22 AM
  • Then you probably need to load the data from the file and compare with original table


    Best Regards,Uri Dimant SQL Server MVP,http://sqlblog.com/blogs/uri_dimant/

    Friday, July 13, 2012 9:28 AM
  • Hi Baba,

    SSIS or any ETL tool is not meant for user interactions like message box pop up. The solutions suggested by Uri and Koen are very good and this is what you must be planning to implement.


    Please vote as helpful or mark as answer, if it helps
    Cheers, Raunak | t: @raunakjhawar | My Blog

    Friday, July 13, 2012 10:10 AM
  • Hi,

    a. SSIS is not an end-user interactive tool like MS-Office; it was designed to run in a server as a background process, not on the end-user

    desktop in an interactive way.

    b. Users shouldn't be launching packages, they should be triggered by SQL Agent or by SQL triggers or some other external condition.

    c. The proper way would be to send an email to the end-user stating that his file was already processed.


    Sebastian Sajaroff Senior DBA Pharmacies Jean Coutu

    • Marked as answer by Eileen Zhao Thursday, July 19, 2012 3:34 AM
    Friday, July 13, 2012 12:00 PM