Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Avamar:AlwaysOnクラスター設定でセカンダリ レプリカでSQLデータベースを正常にリストアする方法

Summary: AVamar 19.4.100-124(SQL 2016 AlwaysOn 2ノード クラスター搭載) お客様がsecodnaryレプリカでSQLデータベースのリダイレクト リストアを実行していて、Avamarリストアが完了したが、データベースがクラスターへの参加に失敗し、次のエラーが発生します。 データベース「ABC」を可用性レプリカ「secondary\AG_Sec」の可用性グループ「AG」に参加できませんでした ...

This article may have been automatically translated. If you have any feedback regarding its quality, please let us know using the form at the bottom of this page.

Article Content


Instructions

  • AvamarバックアップされたSQLデータベースのリダイレクト リストアがセカンダリ レプリカに対して実行されます。
  • リストアが完了します。
  • セカンダリー上のデータベースが「リストア中」状態です。
  • 可用性グループに参加しようとすると、次のエラーが表示されます。

データベース「ABC」を可用性レプリカ「secondary\AG_Sec」の可用性グループ「AG」に参加できませんでした。

この手順については、 Avamar SQL Guide の「Restore to the original availability group」セクションに記載されています。次の情報が表示されます。
 
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番号が同期されているかどうかを確認することです。

プライマリ:
バックアップからセカンダリの不足しているログ バックアップをリストアする問題を解決するには、データベースをAlwaysOnグループに参加させる前に、LSNが同期していることを確認します。 

Article Properties


Last Published Date

31 Jul 2023

Version

2

Article Type

How To