Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Anton Shepelev Newsgroups: comp.databases.ms-sqlserver Subject: Re: `sqlcmd' withholding error messages? Date: Mon, 22 Aug 2022 12:39:52 +0300 Organization: A noiseless patient Spider Lines: 25 Message-ID: <20220822123952.e80b413b6a97e34fb150cf27@g{oogle}mail.com> References: <20220811131035.f10b114df6b905668746c2ab@g{oogle}mail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: reader01.eternal-september.org; posting-host="27032e634897e836e026c82cd8ed2551"; logging-data="2775461"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/k/rRpVsGaUoGUlLTKx3WIquIY47bz7l4=" Cancel-Lock: sha1:oHE3Ru2UaBf4q58CB8d9hyKmElU= X-Newsreader: Sylpheed 3.5.0 (GTK+ 2.24.23; i686-pc-mingw32) Xref: csiph.com comp.databases.ms-sqlserver:2159 Luuk: > -r[0 | 1] > Redirects the error message output to the screen (stderr). > If you do not specify a parameter or if you specify 0, > only error messages that have a severity level of 11 or > higher are redirected. If you specify 1, all error message > output including PRINT is redirected. Has no effect if you > use -o. By default, messages are sent to stdout. Yes. I inovke `sqlcmd' not only with -r 0, but also with -b: -b Specifies that sqlcmd exits and returns a DOS ERRORLEVEL value when an error occurs. The value that is returned to the DOS ERRORLEVEL variable is 1 when the SQL Server error message has a severity level greater than 10 The invocation sqlcmd -r 0 -b should either succeed or print an error message in STDERR. In my case, however, it failed but did not send anything to STDERR. -- () ascii ribbon campaign - against html e-mail /\ http://preview.tinyurl.com/qcy6mjc [archived]