SQL 2016 Azure VM and restoring from Storage Account

  • Hi

    I have deployed SQL 2016 Enterprise in Azure IaaS. I created a VM and installed SQL 2016 onto. For backups I am using Ola scripts to backup databases to a Storage account using SAS as authentication. I have run the SQL backup jobs and they complete successfully. I can set the backup through Azure Portal blob containers.

    I am having an issue when I try to restore the database through SSMS (14.0.17277.0), I navigate to use the SQL credential and it opens, however I do not see the backups

    If I type the backup file name, it finds the file and restores successfully. Can anyone tell me why SSMS cannot see the file.

    Has anyone come across this issue?

    Regards

    Raxso1

  • I'd need to experiment to be sure, but I suspect that the account that SQL Server is running under can't access the blob storage. Focus on security.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Hi

    The SQL server can backup to the storage account and I can restore the database using T-SQL i.e.

    RESTORE DATABASE [TestDB]

    FROM URL = N'https://StorageAccount.blob.core.windows.net/sqlbackup1/DEVOSQL021/TestDB/FULL/DEVOSQL021_TestDB_FULL_20190116_110000.bak' WITH FILE = 1, NORECOVERY, NOUNLOAD, Replace, STATS = 5

    I just cannot view the databases through the GUI which does seem a bit strange.

    Regards

    Raxso1

  • I'm sure that was a bug in a version of SSMS, but I can't remember which one. Try using another version of it?

  • You must provide SAS key in GUI. SSMS is working on your credentials and SQL Server during restore use its own. The same behavior is when you try to restore from share where yours user don't have permissions to share and files but SQL Server have.

    https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/sql-server-backup-to-url?view=sql-server-2017#RestoreSSMS

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply