Running SQL Packager from Command Line

rkhorkprkhorkp Posts: 9
This is what I currently am using:

I have an .net application that
1. runs the SQL Packager from command line to create a temp database.
2. runs sql compare on certain tables between production database and the temp database.
3. runs sql data compare on certain tables between production database and the temp database.
4. delete the temp database.

When I was using an older version, I was able to run this without any user interaction. But now, with version 5, after creating the temp database, there is a prompt that says package is successfull. Can this be remove?

I tried using the quiet mode, but when it does that, there is no indication of work being done. I like how it was in version 1.1 where at the end of the process, there is no prompt and I was able to show the progress of running the package.

Hope this make sense.

Thanks

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello,

    Maybe the old DOS trick of redirecting the output would help?
    sqlpackagetest /server:BRIAN /database:test /makedatabase /quiet > NUL:
    

    Sending the output to NUL: will cause the command-line interpreter to eat the output instead of writing it to the console.
  • Thank you Brian for the tip. This does not work for me. I like the progress indicator with 5.0, but just not the last message box that comes up when the process is complete.

    Is there ay way for me to get the progress indicator, but not the ok message box that come up at the end?
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

    I'm guessing that the quiet option suppresses both the progress bar and the completion message. If that's the case, it looks like an all-or-nothing deal.
  • Hi,

    I'm guessing that the quiet option suppresses both the progress bar and the completion message. If that's the case, it looks like an all-or-nothing deal.

    Brian,

    We're also having the same issue... I didn't see this thread until after I posted a new one. (Oh well, it is sure to be seen now...)

    The previous version worked fine... it was only after we went to version 5 that this became a problem for us.

    Surely this was an oversight in version 5 that can be corrected somehow?

    This is becoming an issue for us to the point that we may need to consider other tools.

    Thanks,
    Bryan
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello,

    Version 5 changed the package format from a Windows Form application that supported writing messages to the console to a console application that can launch a Windows form. The other design presented problems with console messages, and this is why the change was made.
  • Hello,

    Version 5 changed the package format from a Windows Form application that supported writing messages to the console to a console application that can launch a Windows form. The other design presented problems with console messages, and this is why the change was made.

    That makes sense... except for the need for a final dialog with an ok button.

    It looks like there is a reply on the other thread that describes how to suppress the dialog... I'll give that a try.

    Thanks for the assistance! :)
Sign In or Register to comment.