Competition: What’s your favorite Redgate tool? Enter now.

Log file with command line and /quiet

OMonienOMonien Posts: 2
edited February 17, 2005 12:08PM in SQL Packager Previous Versions
I'm using a generated SQLPackage in commandline mode to upgrade a DB through an automated system.

UpgradeDB /quiet

As long as everything works fine, this is ok. But I'm completely stuck if the upgrade fails for any reason. The Upgrade.Exe terminates and thats it.

How do I get a log file containing the error messages (or even some details if the upgrade was successfull)?

The /out switch does not work here.

Note: This is all about *using/executing* a prepared package from the command line. *Creating* a package from command line has the /out switch as required.
Olaf Monien


  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Olaf,

    SQL Packages should write any error message to the console. What it does is to take the messages that normally appear in the SQL Package's output window and write them to the console instead, even with the /quiet switch specified.

    You can try redirecting the output of the SQL Package to a text file if you are running the package from an unattended scheduler job. There are also a series of return codes that you can trap using an ERRORLEVEL in a batch file to determine if the package had run successfully.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Olaf,

    SQL Packages run with the /quiet switch do display a press any key message, but that doesn't mean that the application is waiting for your input. The message only appears because when control is returned to the console, the prompt (c:>) is not recreated.

    When I run a package, it writes an informational message that it's been successful and then 'Press any key'.

    As far as you know, has anybody possibly modified any code in the SQL Packager Code Templates folder to customize the package output? It's possible to make modifications to the project so that it does not write to the console...
This discussion has been closed.