Sample Header Ad - 728x90

SQL Server 2014 SP3 Backup to URL error

2 votes
0 answers
284 views
We have a database on a SQL Server 2014 (SP3 12.0.6433.1) and I'm trying to take a backup to Azure Blob Storage. I have followed this document (https://learn.microsoft.com/en-us/previous-versions/sql/2014/relational-databases/backup-restore/sql-server-backup-to-url?view=sql-server-2014) and created a credential using identity and access key using the following code:
CREATE CREDENTIAL mycredential WITH IDENTITY = 'mystorageaccount'
,SECRET = '' ;
and tried to do a backup using the following code:
BACKUP DATABASE mydb
TO URL = 'https://mystorageaccount.blob.core.windows.net/mycontainer/mydb.bak '
WITH CREDENTIAL = 'mycredential'
,COMPRESSION
,STATS = 5;
GO
However, I am getting the following error:
Msg 3271, Level 16, State 1, Line 1
A nonrecoverable I/O error occurred on file "https://mystorageaccount.blob.core.windows.net/mycontainer/mydb.bak :" Backup to URL received an exception from the remote endpoint. Exception Message: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel..
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
The database is ~3GB. The error is thrown after the query executes for about 1.5 mins. The Azure storage account I am using is a General Purpose V1 Storage account. However, I have also tried this with a V2 account. Has anyone gone through this?
Asked by AzNerd (21 rep)
Jun 28, 2022, 04:12 PM
Last activity: Jun 28, 2022, 08:03 PM