SQL Server 2014 Backup to URL error

Amrita Visalam 26 Reputation points
2022-06-28T04:41:58.453+00:00

Hello, 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 = '<storage access key>' ; 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: ![215533-image.png][1] 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 Azure storage account I am using is a General Purpose V1 Storage account. However, I have also tried this with a V2 account. I tried doing a backup from a SQL Server 2012 database and it was working. But it isn't working for SQL 2014. Any idea why? [1]: /api/attachments/215533-image.png?platform=QnA

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,657 questions
Azure Migrate
Azure Migrate
A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.
715 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,408 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,605 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,545 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. YufeiShao-msft 7,051 Reputation points
    2022-06-29T02:24:58.307+00:00

    Hi anonymous user

    This issue may occur because the storage account that you are trying to back up to was created with the Account Kind setting set to Blod

    Please designate a container in this storage account for backup to URL

    https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/sql-server-backup-to-url-best-practices-and-troubleshooting?view=sql-server-ver16#troubleshooting-backup-to-or-restore-from-url

    -------------

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. YufeiShao-msft 7,051 Reputation points
    2022-06-29T07:43:20.147+00:00

    Hi anonymous user

    Could not establish trust relationship for the SSL/TLS secure channel..

    Please check your SQL Server whether enable TLS protocol version 1.2 with the registry:

    Registry Key Name:   
      
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client  
    Value 0  
    Name:          Enabled  
    Type:            REG_DWORD  
    Data:            0x1  
    

    If yes

    You had better change the supported TLS version or use cumulative updates for SQL Server (Cumulative Update 5 for SQL Server 2014 SP2)

    https://support.microsoft.com/en-us/topic/kb4017023-sql-server-2012-2014-or-2016-backup-to-microsoft-azure-blob-storage-service-url-isn-t-compatible-for-tls-1-2-e9ef6124-fc05-8128-86bc-f4f4f5ff2b78

    -------------

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.