T-SQL Backup/Restore to/from URL does not work on SQL Server 2017 Web Edition on Ubuntu Linux 16.04 LTS

466 Views Asked by At

I tried, without success, to run a T-SQL script to Backup to URL and another one to Restore to URL on SQL Server 2017 Web Edition, which is running on Ubuntu 16.04 LTS. The credential was successfully created.

Here's an example of the T-SQL for Backup that I'm trying to run:

DECLARE @name varchar(100)
DECLARE @fileURL varchar(100)
SET @name = 'test-db'
SET @fileURL = 'https://mystorageaccountname.blob.core.windows.net/databases/test-db.BAK'
       BACKUP DATABASE @name 
       TO URL = @fileURL
                WITH CREDENTIAL = 'mycredential'
                ,COMPRESSION
                ,STATS = 5;

Here's the error that I'm getting on MSSQL Management Studio:

Msg 3292, Level 16, State 6, Line 5
A failure occurred while attempting to execute Backup or Restore with a URL device specified. Consult the operating system error log for details.
Msg 3013, Level 16, State 1, Line 5
BACKUP DATABASE is terminating abnormally.

Here's the error that I'm getting on /var/log/syslog:

#015VDI: "C:\binn\BackupToUrl.exe" "b" "p" "680074007400700073003A002F002F0073007700650065007400640061007400610062006100730065006200610063006B007500700073002E0062006C006F0062002E0063006F00720065002E00770069006E0064006F00770073002E006E00650074002F006400610074006100620061007300650073002F0068006300640061006D006F00620069006C0065002E00420041004B00" "73007700650065007400640061007400610062006100730065006200610063006B00750070007300" "01000000D08C9DDF0115D1118C7A00C04FC297EB010000008AB2169DF1DE3A45B5514DCCD09182C3000000001200000061007A007500720065006B006500790000001066000000010000200000008ECF1319A21E667E0E32E83135C57DFCAF4E3DFF2AABDA00E3E2D814B5C88D2E000000000E8000000002000020000000E9E64579DF38EA0E66886B8D454C4F4256A682A124E70D86EC0DA087112ECA0450000000F92ED8FD343DADDE9518C412CA5EAB188316B24A6A0B407CCEA9AE142A9DBC282085ABF133BFDF017A3AFA9CEB4C5039433D15FA47A64A1339F2D030ED3383C58F81A2C3634FA945B6B819F113AB22DF40000000E9CDF76A290F18299BBE99C273FCA31E4622334C645EBFE8C5AA9C4F68C1A323A2F0EED33B8F6E8D5922B5B78DE1F6DB456864A290689C98A3631EA3F62505D3" "NOFORMAT" "4D005300530051004C00530045005200560045005200" "" "DB" "68006300640061006D006F00620069006C006500" "NOTRACE"
#015BackupToUrl: couldn't load process Error Code:  80070002
#0152018-03-14 12:35:25.30 Backup      Error: 3041, Severity: 16, State: 1.
#0152018-03-14 12:35:25.30 Backup      BACKUP failed to complete the command BACKUP DATABASE hcdamobile. Check the backup application log for detailed messages.

Have you guys had this problem before? Do I need to install any additional package to be able to run Backup to URL on Linux?

0

There are 0 best solutions below