Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #2244
| From | Erland Sommarskog <esquel@sommarskog.se> |
|---|---|
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: `sqlcmd' defective by design? |
| Date | 2024-05-13 22:44 +0200 |
| Organization | Erland Sommarskog |
| Message-ID | <XnsB171E75C59835Yazorman@127.0.0.1> (permalink) |
| References | <20240513142445.206132420c1c47759b78c197@g{oogle}mail.com> |
Anton Shepelev (anton.txt@g{oogle}mail.com) writes:
> I have a nasty problem in my automation batch scripts that
> invoke `sqlcmd`[1]: whatever I try, I cannot cause it to
> terminate with an error level in case of a timeout. The
> parameters `-V1 -b' do not help a wee whit. The article on
> error severities[2] says:
>
> For compatibility reasons, the Database Engine converts
> severity 10 to severity 0 before returning the error
> information to the calling application.
>
> This alone sounds crazy, but the apparent inabilty to
> override this illogical behavior makes `sqlcmd' incurably
> broken. Please, tell me I am wrong.
>
What sort of timeout are we talking about? I guess this is something
that involves a linked server - or how would you else get a timeout
with SQLCMD?
There are situations when query timeouts on calls to stored procedures
on linked server only results in an informational message. I've
written about it here:
https://www.sommarskog.se/error_handling/Appendix1.html#querytimeout
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
`sqlcmd' defective by design? Anton Shepelev <anton.txt@g{oogle}mail.com> - 2024-05-13 14:24 +0300
Re: `sqlcmd' defective by design? Anton Shepelev <anton.txt@g{oogle}mail.com> - 2024-05-13 17:32 +0300
Re: `sqlcmd' defective by design? Erland Sommarskog <esquel@sommarskog.se> - 2024-05-13 22:44 +0200
Re: `sqlcmd' defective by design? Anton Shepelev <anton.txt@gmail.moc> - 2024-05-14 01:05 +0300
Re: `sqlcmd' defective by design? Erland Sommarskog <esquel@sommarskog.se> - 2024-05-14 21:23 +0200
csiph-web