Delen via


sys.sp_rda_reconcile_columns (Transact-SQL)

Applies to: SQL Server 2016 (13.x) and later versions

Reconciles the columns in the remote Azure table to the columns in the Stretch-enabled SQL Server table.

Important

Stretch Database is deprecated in SQL Server 2022 (16.x) and Azure SQL Database. This feature will be removed in a future version of the Database Engine. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

sp_rda_reconcile_columns adds columns to the remote table that exist in the Stretch-enabled SQL Server table but not in the remote table. These columns may be columns that you accidentally deleted from the remote table. However, sp_rda_reconcile_columns doesn't delete columns from the remote table that exist in the remote table but not in the SQL Server table.

Important

When sp_rda_reconcile_columns recreates columns that you accidentally deleted from the remote table, it does not restore the data that was previously in the deleted columns.

Transact-SQL syntax conventions

Syntax

sp_rda_reconcile_columns @objname = '@objname'
[ ; ]

Arguments

@objname = '@objname'

The name of the Stretch-enabled SQL Server table.

Return code values

0 (success) or > 0 (failure).

Permissions

Requires db_owner permissions.

Remarks

If there are columns in the remote Azure table that no longer exist in the Stretch-enabled SQL Server table, these extra columns don't prevent Stretch Database from operating normally. You can optionally remove the extra columns manually.

Examples

To reconcile the columns in the remote Azure table, run the following statement.

EXEC sp_rda_reconcile_columns
    @objname = N'StretchEnabledTableName';