Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #2159

Re: `sqlcmd' withholding error messages?

Path csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Anton Shepelev <anton.txt@g{oogle}mail.com>
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> (permalink)
References <20220811131035.f10b114df6b905668746c2ab@g{oogle}mail.com> <nnd$0ac332a1$732489f3@eef0fc901d3b0f44>
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

Show key headers only | View raw


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]

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

`sqlcmd' withholding error messages? Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-08-11 13:10 +0300
  Re: `sqlcmd' withholding error messages? Erland Sommarskog <esquel@sommarskog.se> - 2022-08-12 22:45 +0200
    Re: `sqlcmd' withholding error messages? Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-08-19 17:52 +0300
  Re: `sqlcmd' withholding error messages? Luuk <luuk@invalid.lan> - 2022-08-19 17:44 +0200
    Re: `sqlcmd' withholding error messages? Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-08-22 12:39 +0300
      Re: `sqlcmd' withholding error messages? Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-08-22 17:46 +0300

csiph-web