0

Actually, I want to insert data as bulk insert from bunch of files, so tried with the solution https://stackoverflow.com/a/16078539/10802715 . But while executing that script, getting an error that says for security reason, xp_cmdshell is turned off. However, t turn it on, when from the shell, following commands:

Use Master
GO

EXEC master.dbo.sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO

EXEC master.dbo.sp_configure 'xp_cmdshell', 1
RECONFIGURE WITH OVERRIDE
GO

error displayed is:

The specified option 'xp_cmdshell' is not supported by this edition of SQL Server and cannot be changed using sp_configure.

SQL Version: 2019 Edition: Developer OS: Ubuntu 20.04

Thanks in advance

Parth Mansata
  • 145
  • 1
  • 7
  • 1
    `xp_cmdshell` isn't needed to perform a `BULK INSERT`. – Thom A May 12 '21 at 12:50
  • 2
    Did you read the [limitations of SQL Server on Linux](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-editions-and-components-2019?view=sql-server-ver15#Unsupported)? `xp_cmdshell` isn't supported. – Thom A May 12 '21 at 12:50
  • @Larnu thanks for letting me know the limitations of MS SQL on Linux. Can you please guide me, how can I do bulk insert? I have a bunch of csv files for different tables. Thanks in advanc – Parth Mansata May 12 '21 at 16:44
  • By using a `BULK INSERT`: [BULK INSERT (Transact-SQL)](https://learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql?view=sql-server-ver15) – Thom A May 12 '21 at 17:41

0 Answers0