Sql-server – Unclosed quotation mark after the character string restoring from Azure blob

azuresql server

I am using the following command ( with altered blobname and datbase name) to try to restore into an Azure SQL Server database from a backup of a 2014 database

I am using Australia South East with my MSDN Credits

I have tried with SQL Server 2016 Management Studio and 2017 Management Studio

RESTORE DATABASE originaldatbasename
FROM URL = 'https://longblobname.bak’
WITH CREDENTIAL = 'mycredental';
, STATS = 5 

I get an error

Unclosed quotation mark after the character string 
'https://longblobname.bak’
WITH CREDENTIAL = mycredental;
, STATS = 5 
'.
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near 'https://longblobname'.

Best Answer

The character after bak is not a single quote (located on the double quote key).

RESTORE DATABASE originaldatbasename
FROM URL = 'https://longblobname.bak'
WITH CREDENTIAL = 'mycredental', STATS = 5 ;