AlwayOn DB sync

Vijay Kumar 2,016 Reputation points
2021-10-22T04:25:03.093+00:00

Hi Team,

is it possible to perform transactional log backup on Primary while secondary DB in initializing/In Recovery in SQL Serrver 2016 AlwayOn Availability?

Because logspace used is 99%.

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,708 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,552 questions
0 comments No comments
{count} votes

Accepted answer
  1. YufeiShao-msft 7,056 Reputation points
    2021-10-22T07:54:29.49+00:00

    Hi @Vijay Kumar ,

    You taking log backups on the primary does not change anything. When the log is required to be kept for a secondary, backup does not truncate the log. The secondary is simply running recovery on the database, that's all it does, applying the log received from the primary. The Write Ahead Protocol guarantees that whatever the secondary is 'recovering' is going to be identical to whatever the primary has in the database.

    Here are the relevant explanations:
    https://dba.stackexchange.com/questions/89670/how-alwayson-availability-group-secondary-replica-catches-up-with-primary-after

    logspace used is 99%

    Try to reboot each server in Availability Group in turn. If it does not work, you can try to do the shrink on the primary

    https://dba.stackexchange.com/questions/73850/shrink-transaction-log-while-using-alwayson-availability-group


    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 additional answers

Sort by: Most helpful