Can we create Database snapshot on secondary replica in AG

Yashwant Vishwakarma 116 Reputation points
2021-02-05T16:08:14.287+00:00

Dear Folks,

is it possible to create database snapshot on secondary read replica in AG with resource governor limiting queries from application.?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,166 questions
{count} votes

Accepted answer
  1. Yashwant Vishwakarma 116 Reputation points
    2021-02-12T15:33:41.073+00:00

    Hi Sean,

    I created the database snapshots for one of our database which is of almost 4.0 TB, I observed when the third party tool BryteFlow get connected and started fetching queries latency on secondary replica slowly increased by approx. 7000 seconds and after that database snapshot went into suspect mode.

    When I tried to search logs I found the error < Z:\Snapshots\dbname_ss.ss: Operating system error 665(The requested operation could not be completed due to a file system limitation) encountered. Error: 17053, Severity: 16, State: 1.>

    I also created resource governor for that tool not to take more than 15% CPU and 25% memory and DOP =2

    is there any way I can meet this requirement ?


3 additional answers

Sort by: Most helpful
  1. Sean Gallardy - MSFT 1,891 Reputation points Microsoft Employee
    2021-02-05T17:28:55.283+00:00

    Is it possible? Yes.
    Is it a good idea? Probably not.

    0 comments No comments

  2. Yashwant Vishwakarma 116 Reputation points
    2021-02-06T11:40:20.09+00:00

    Hi Sean Gallardy,

    Thanks for your reply.
    I am curious to know why it is not a good idea so that I can decide for my environment ?


  3. CathyJi-MSFT 22,331 Reputation points Microsoft Vendor
    2021-02-08T08:41:41.557+00:00

    Hi @Yashwant Vishwakarma ,

    > Can we create Database snapshot on secondary replica in AG

    Yes, you can. You can create a database snapshot on an primary or secondary database in an availability group. The replica role must be either PRIMARY or SECONDARY, not in the RESOLVING state. Refer to MS document Database Snapshots with Always On Availability Groups.


    If the response is helpful, please click "Accept Answer", thank you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.