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 < sometable > select < someslectquery >.

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?

  • Did you run your queries on the same database at both of them? Mar 17 at 6:41
  • By both I guess AWS and AZURE. No the database machine is different, One on Azure and one on AWS. But version and hardware configuration is same,
    – Manoj R
    Mar 17 at 7:08
  • For how long the query is running? Does it return something in the end or it's just blocked and no result is returned? Mar 17 at 20:19
  • The query disappears from database but on linux it shows the query is till running. When it runs properly it runs in 15 minutes. This is not happening for single query, but randomly for any query.
    – Manoj R
    Mar 18 at 4:42
  • Even if you don't see the query, if the result after 15 minutes are returned it means that the query has ran. Run the query from SSMS and try to check if you see it through sp_who2 Mar 18 at 7:01

Probably not too many people using CentOS & sqlcmd so I would investigate that first or maybe you should try out mssql-cli instead ?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.