2

Some system extended procedures work on 2017 RC2

e.g.

exec xp_dirtree @directory = '/var', @depth = 1

Correctly returns the directories contained in /var

However:

exec xp_create_subdir '/foo'

Returns

Msg 22048, Level 15, State 0, Line 18
Error executing extended stored procedure: Invalid Parameter

Is the procedure supported, and if so what is the syntax for the parameter(s)?

Tested running on Ubuntu, inside Docker container on MacOS.

select @@VERSION
Microsoft SQL Server 2017 (RC2) - 14.0.900.75 (X64)   Jul 27 2017 08:53:49   Copyright (C) 2017 Microsoft Corporation  Developer Edition (64-bit) on Linux (Ubuntu 16.04.2 LTS)
5

According to the latest official release notes, no it is not supported.

The following features and services are not available on Linux at this time. The support of these features will be increasingly enabled during the monthly updates cadence of the preview program.

...

System extended stored procedures (XP_CMDSHELL, etc.)

It does say that there will be increasingly available but does not make any commitment toward a time or viability at release.

  • As I've shown in the first sentence, Microsoft's statement "they" are not supported is misleading / incorrect. At least one works - see the one line of code at the top. I suspect that the wording is to keep the release notes simple, rather than get into detail of which ones work, and to what to degree. Given the lack of detailed documentation about that, it's possible this question can only be answered by Microsoft. I may also post this question in one of their GitHub repositories. If I get an answer, I will report back. – Paul Holmes Aug 22 '17 at 23:53
  • 3
    @PaulHolmes Ultimately, it's only supported if it's documented. In the case of xp_create_subdir, it's not documented even for Windows ... so it's technically unsupported. I doubt you'll get any firm commitment from Microsoft on this specific one. – AMtwo Aug 22 '17 at 23:59
  • Furthermore; they had to make xp_dirtree because ssms calls it! Most likely it doesn't call any others. – Joshua Aug 23 '17 at 2:23
  • @AMtwo "It's only supported if it's documented" - Fair interpretation, I should have phrased the question differently, e.g. Does xp_create_subdir work in Linux. The reason for question is looking at the potential to fork Ola Hellengren's maintenance solution, to add support for Linux. The DatabaseBackup procedure currently depends on xp_create_subdir. – Paul Holmes Aug 23 '17 at 7:21
  • "It's only supported if it's documented" is Microsoft's interpretation, not mine. You might try contacting Ola to see if he's planning on supporting SQL Server on Linux. No point in forking his code if he's going to have a solution for RTM. – AMtwo Aug 23 '17 at 11:47

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.