Question

In SQL Server Management Studio, it is possible to run batch commands when in SQLCMD mode, using the !! command. However, in Azure Data Studio, this does not seem to work (SQLCMD has been available in ADS since version 1.13.0 in November 2019), I'm running ADS as Windows Administrator.

How can I execute batch commands in Azure Data Studio using SQLCMD mode? Did I miss something, or is there some of the (scarce) documentation I need to read?

- In SQL Server Management Studio:

Works in SQL Server Management Studio

- In Azure Data Studio

Doesn't work in ADS

Was it helpful?

Solution

This is a known open issue with SQLCMD in ADS, where SQLCMD mode fails to parse some sqlcmd keywords. The issue is currently on the backlog.

ADS includes a terminal window (View-->Terminal) so you can easily run OS commands on your client under the same query tab without SQLCMD.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top