Skip to content

Files

Latest commit

441ef02 · Jan 25, 2022

History

History
48 lines (36 loc) · 1.58 KB

sys-sp-cleanup-data-retention.md

File metadata and controls

48 lines (36 loc) · 1.58 KB
title description keywords services ms.service ms.topic author ms.author ms.reviewer ms.date
sys.sp_cleanup_data_retention (Transact-SQL) - Azure SQL Edge
Learn about using sys.sp_cleanup_data_retention (Transact-SQL) in Azure SQL Edge
sys.sp_cleanup_data_retention (Transact-SQL), SQL Edge
sql-edge
sql-edge
reference
rothja
jroth
jroth
09/22/2020

sys.sp_cleanup_data_retention (Transact-SQL)

Applies to: Azure SQL Edge

Performs cleanup of obsolete records from tables that have data retention policies enabled. For more information, see Data Retention.

Syntax

sys.sp_cleanup_data_retention
    { [@schema_name = ] 'schema_name' },
    { [@table_name = ] 'table_name' },
    [ [@rowcount =] rowcount OUTPUT ]

Arguments

[ @schema_name = ] schema_name Is the name of the owning schema for the table on which cleanup needs to be performed. schema_name is a required parameter of type sysname.

[ @table_name = ] 'table_name' Is the name of the table on which cleanup operation needs to be performed. table_name is a required parameter of type sysname.

Output parameter

[ @rowcount = ] rowcount OUTPUT rowcount is an optional OUTPUT parameter that represents the number of records cleanup from the table. rowcount is int.

Permissions

Requires db_owner permissions.

Next steps