Dela via


sys.sp_rda_set_rpo_duration (Transact-SQL)

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

Sets the number of hours of migrated data that SQL Server retains in a staging table, to help ensure a full restore of the remote Azure database, if a point in time restore is necessary.

For more info, see Stretch Database reduces the risk of data loss for your Azure data by retaining migrated rows temporarily.

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.

Transact-SQL syntax conventions

Syntax

sp_rda_set_rpo_duration [ @duration_hrs = ] duration_hrs
[ ; ]

Arguments

[ @duration_hrs = ] duration_hrs

The number of hours (a non-null integer value) of migrated data that you want SQL Server to retain for the current Stretch-enabled database. The default value, which is also the minimum value, is 8 hours.

Note

Higher values require more storage space on SQL Server.

Permissions

Requires db_owner permissions.

Remarks

Get the current value by running sys.sp_rda_get_rpo_duration (Transact-SQL).