Avamar: AlwaysOn 클러스터 설정의 보조 복제본에서 SQL 데이터베이스를 복원하는 방법

Summary: Avamar 19.4.100-124 및 SQL 2016 AlwaysOn 2노드 클러스터 고객이 secsidnadary 복제본에서 SQL 데이터베이스의 리디렉션 복원을 수행하고 있으며 Avamar 복원이 완료되었지만 데이터베이스가 클러스터에 연결하지 못함 오류: 데이터베이스 'ABC'를 가용성 복제본 'secondary\AG_Sec'의 가용성 그룹 'AG'에 조인하지 못했습니다. ...

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

  • Avamar 백업된 SQL 데이터베이스의 리디렉션 복원은 보조 복제본으로 실행됩니다.
  • 복원이 완료됩니다.
  • 보조 데이터베이스가 "복원 중 상태"입니다.
  • 가용성 그룹에 가입하려고 하면 다음 오류가 표시됩니다.

데이터베이스 'ABC'를 가용성 복제본 'secondary\AG_Sec'의 가용성 그룹 'AG'에 가입시키지 못했습니다.

이 절차는 Avamar SQL 가이드의 "원래 가용성 그룹으로 복원" 섹션에 설명되어 있습니다. 그 내용은 다음과 같다.
 
When you restore to the original availability group, the restore process can automatically restore the databases on both the primary replica and the secondary replicas. 
You can also restore databases only on the primary replica. 
When you restore a  database only on the primary replica, the corresponding database on the secondary replicas is in a restoring state. 
To restore the databases on the secondary replicas as part of the availability group, manually prepare and restore the databases, and join them to the availability group on the secondary replicas. 
You can also set the databases on a secondary replica online without rejoining them to the availability group by restoring the databases with the RECOVERY recovery operation. 

보조는 복원 중 상태여야 합니다. 문제는 보조 복제본 'secondary\AG_Sec'의 데이터베이스 'ABC'가 주 복제본과 동기화되지 않는다는 것입니다. 일부 로그 레코드가 누락되었기 때문입니다.

SQL Server AlwaysOn은 나머지 로그를 적용하여 둘 다 동기화된 상태로 유지할 수 없습니다. 

이러한 상황에서 첫 번째 단계는 두 복제본 노드에서 데이터베이스 'ABC'에 대한 LSN 시퀀스를 확인하는 것입니다.

다음 쿼리를 실행하여 이를 확인합니다.
 
SELECT msdb.dbo.backupset.database_name,
msdb.dbo.backupset.backup_start_date,
msdb.dbo.backupset.backup_finish_date,
msdb.dbo.backupset.type,
msdb.dbo.backupset.database_backup_lsn,
msdb.dbo.backupset.first_lsn,
msdb.dbo.backupset.last_lsn
FROM msdb.dbo.backupmediafamily
INNER JOIN msdb.dbo.backupset
ON msdb.dbo.backupmediafamily.media_set_id = msdb.dbo.backupset.media_set_id 
WHERE database_name IN ('ABC')
--and msdb.dbo.backupset.backup_finish_date between '1/20/2022' and '12/23/2022'
ORDER BY 
2 DESC,
3 DESC

이렇게 하면 2022년의 ('ABC')에 대한 전체 백업 기록 세부 정보가 제공됩니다.
요구 사항에 맞게 날짜 범위를 사용자 지정할 수 있습니다.
중요한 점은 이 데이터베이스의 기본 및 보조 LSN 번호가 동기화되어 있는지 확인하는 것입니다.

이 문제를 해결하려면 Primary:
Backup에서 보조 노드의 누락된 로그 백업을 복원한 다음 데이터베이스를 AlwaysOn 그룹에 조인하기 전에 LSN NUNBER가 동기화되어 있는지 확인합니다. 
Article Properties
Article Number: 000206971
Article Type: How To
Last Modified: 05 Sep 2025
Version:  3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.