I am using the Public Preview of SQL Server 2016 on Linux. I am trying to run xp_cmdshell and get the following error. I suspect it has to do with permissions but have no idea how to fix this. I have spent many hours searching for some answers but there seems to be little support for SQL Server on Linux. I am running this using an administrator account. SQL Server is installed on Ubuntu 16.4 (as recommended). I connect to it with Microsoft SQL Management Studio running on Windows 10.
SQL code:
EXEC xp_cmdshell @SQLtext, no_output
Error message:
Msg 15121, Level 16, State 21, Procedure xp_cmdshell, Line 1 [Batch Start Line 159] An error occurred during the execution of xp_cmdshell. A call to 'CreateProcess' failed with error code: '2'.
According to Microsoft's Release Notes for SQL Server 2017 General Availability, the following are currently not available on Linux:
Database engine
SQL Server Agent
High Availability
Security
Services
Microsoft also has a list of Release notes and a list of unsupported features here.