SQL Server Snapshot Agent suddenly getting error 1130 when trying to connect to Azure File Storage

Bert 20 Reputation points

I have the following SQL Server Replication Setup

Publisher server is an Azure SQL Managed Instance, Subscriber server is the same server

Storage is Azure File Share

I'm trying to setup replication from a database on a managed instance (DB_1) to another db on the same managed instance (DB_2).

When running the snapshot agent, on step 2 I'm getting error:

Failed to connect to Azure Storage '\<account>.file.core.windows.net\snapshot' with OS error: 1130.

This was working a few weeks ago.

Has anything changed? Do you know why this is happening all of a sudden?

I've also noticed this on step 1: Executed as user: User Manager\ContainerAdministrator

Many thanks


Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,200 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.
13,067 questions
{count} votes

Accepted answer
  1. Anand Prakash Yadav 7,465 Reputation points Microsoft Vendor

    Hello Bert,

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept" the answer. Accepted answers show up at the top, resulting in improved discoverability for others.

    Issue: The Snapshot Agent in SQL Server replication setup is failing to connect to an Azure File Share with OS error 1130. The setup, which worked a few weeks ago, involves an Azure SQL Managed Instance for both the publisher and subscriber.

    Cause: An Azure service issue disrupted connectivity, affecting production replication subscriptions.

    Solution: There was no issue with the user configuration. After Microsoft performed scheduled maintenance to fix the Azure service issue, connectivity was restored, and the replication problem was resolved.

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. MikeyQiaoMSFT-0444 1,090 Reputation points


    Do you mean that this issue occurs sporadically?

    Error 1130 usually indicates that the network connection is unavailable.

    There are several possible reasons for this:

    1. Network connection issues, such as firewall settings that may block or occupy port 445.
    2. Permission issues, whether the Snapshot Agent account has permissions to write files to Azure.
    3. Storage capacity reached its limit.

    Also, where are the Steps you mentioned coming from, can you upload that article here?

    For more information on Azure Storage connection issues, you can refer to:https://techcommunity.microsoft.com/t5/azure-database-support-blog/replication-configuration-between-managed-instance-and-on/ba-p/1992389

    Best Regards,

    Mikey Qiao

    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.

    0 comments No comments

  2. Anand Prakash Yadav 7,465 Reputation points Microsoft Vendor

    Hello Bert,

    Thank you for posting your query here!

    The error message “Failed to connect to Azure Storage ‘<account>.file.core.windows.net\snapshot’ with OS error: 1130” indicates a problem with connecting to the Azure File Share.

    As for Network Connectivity,

    · Confirm that the network connectivity between your Azure SQL Managed Instance and the Azure File Share is functioning as expected.

    · Check if there are any network security group (NSG) rules blocking outbound traffic on port 445 (used for SMB file share access).

    · Ensure that the storage account firewall rules allow traffic from the managed instance’s IP address.

    Storage Account Configuration:

    · Check if the storage account has any firewall rules or virtual network service endpoints that might restrict access.

    · Ensure that the storage account key or shared access signature (SAS) used for authentication is valid.

    Authentication Context:

    · The “Executed as user: User Manager\ContainerAdministrator” message suggests that the snapshot agent is running under a specific user context.

    · Ensure that the user context has the necessary permissions to access the storage account.

    · If you’re using managed identities, verify that the managed identity associated with the managed instance has the required permissions on the storage account.

    Do let us know if you have any further queries. I’m happy to assist you further.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

  3. Bert 20 Reputation points

    after some scheduled maintenance last night to fix an Azure service issue, that disconnected our production replication subscriptions, the problem was fixed.

    So it seems we had everything set up correctly but an issue Microsoft had was causing the problems.

    0 comments No comments