microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.52k stars 893 forks source link

SQLCMD Execution Reports "Command Include is not Supported" #8454

Open CheetahChrome opened 4 years ago

CheetahChrome commented 4 years ago

Issue Type: Bug

On a SQL Server 2019 database when I attempt to execute a sql command script it reports:

Execution failed due to an unexpected error: SQL Execution error: A scripting error occurred. Command Include is not supported

Same script works in SSMS 18.4. Script looks like this:

:setvar Database "Windjammer" 
:setvar path "C:\Users\{Personal folders etc}\WindJammer\"

USE $(Database)

:r $(Path)"TearDownConstraints.sql"
:r $(Path)"TearDownTables.sql"

Azure Data Studio version: azuredatastudio 1.13.1 (d08d07fe39c7fe74f9265db02cb963c38d048299, 2019-11-14T23:08:09.800Z) OS version: Windows_NT x64 10.0.18363

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9900 CPU @ 3.10GHz (6 x 3096)| |GPU Status|2d_canvas: unavailable_software
flash_3d: disabled_software
flash_stage3d: disabled_software
flash_stage3d_baseline: disabled_software
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: disabled_off
rasterization: disabled_software
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: disabled_software
viz_display_compositor: disabled_off
webgl: unavailable_software
webgl2: unavailable_software| |Load (avg)|undefined| |Memory (System)|8.51GB (2.00GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions (3) Extension|Author (truncated)|Version ---|---|--- admin-tool-ext-win|Mic|0.0.1 datavirtualization|Mic|1.1.0 sql-search|Red|0.3.6
anthonydresser commented 4 years ago

Are you attempting to run this in the terminal of azuredatastudio?

Charles-Gagnon commented 4 years ago

It looks like this is for the SQLCMD mode in the query editor.

@udeeshagautam This looks like another instance of a keyword we don't support - can you confirm this?

CheetahChrome commented 4 years ago

Are you attempting to run this in the terminal of azuredatastudio?

From a script targeting a local instance of SQL Server 2019. Here are the steps:

image

CheetahChrome commented 4 years ago

Also why does it report Choose SQL Language once I run the script?

image

kburtram commented 4 years ago

@udeeshagautam could you please confirm this is expected based on current SQLCMD mode implementation? Also, do you know when we're expecting to support these commands?

udeeshagautam commented 4 years ago

Hi, yes the :r (Include) command is not supported yet - so the error is expected. We've started working to enable these command starting with :Connect, should be available in coming months.