| title | sys.sp_rda_reconcile_batch (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| description | Learn how to use sys.sp_rda_reconcile_batch to reconcile the batch ID in the Stretch-enabled SQL Server table with the batch ID stored in the remote Azure table. | ||
| ms.custom | |||
| ms.date | 07/25/2022 | ||
| ms.service | sql | ||
| ms.reviewer | randolphwest | ||
| ms.subservice | stored-procedures | ||
| ms.topic | reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 6d21eac3-7b6c-4fe0-8bc4-bf503f3948a6 | ||
| author | markingmyname | ||
| ms.author | maghan |
[!INCLUDE sqlserver2016]
Reconciles the batch ID stored in the Stretch-enabled SQL Server table with the batch ID stored in the remote Azure table.
Important
Stretch Database is deprecated in [!INCLUDE sssql22-md]. [!INCLUDE ssNoteDepFutureAvoid-md]
Typically you only have to run sp_rda_reconcile_batch if you have manually deleted the most recently migrated data from the remote table. When you manually delete remote data that includes the most recent batch, the batch IDs are out of sync and migration stops.
To delete data that has already been migrated to Azure, see the Remarks on this page.
Transact-SQL Syntax Conventions
sp_rda_reconcile_batch @objname = '@objname'
@objname = '@objname'
The name of the Stretch-enabled SQL Server table.
Requires db_owner permissions.
If you want to delete data that has already been migrated to Azure, do the following things.
-
Pause data migration. For more info, see Pause and resume data migration (Stretch Database).
-
Delete the data from the SQL Server staging table by running a DELETE command with the STAGE_ONLY hint. For more info, see Make administrative updates and deletes.
-
Delete the same data from the remote Azure table by running a DELETE command with the REMOTE_ONLY hint.
-
Run sp_rda_reconcile_batch.
-
Resume data migration. For more info, see Pause and resume data migration (Stretch Database).
To reconcile the batch IDs, run the following statement.
EXEC sp_rda_reconcile_batch @objname = N'StretchEnabledTableName';