sqlcmd is running but database shown no running query We are facing this weird issue on our Azure setup. The database is SQLServer and client is CentOS.
We fire queries using sqlcmd. Sometimes it happens that you see the sqlcmd running, but there is no runnable/sleeping query running in db ( seen using sp_who2 ). This happens only for DML queries, for the queries of the sort insert into &lt; sometable &gt; select &lt; someslectquery &gt;.
And this happens like 25% of time. This occurs even when we run some procedure. The procedure stops at some insert .. select query. But sqlcmd still show s it running.
We have another setup with AWS with same database and same Centos, but we haven't seen this thing happening there.
On same azure database, when we run the queries using windows machine using SSMS then the query completed on back-end. We tested this multiple times.
Has anyone face any such thing? Where to look for the issue?
Probably not too many people using CentOS &amp; sqlcmd so I would investigate that first or
maybe you should try out mssql-cli instead ?
https://github.com/dbcli/mssql-cli/tree/master/doc/installation