sp_changedistributiondb (Transact-SQL)
SQL Server 2008
Changes the properties of the distribution database. This stored procedure is executed at the Distributor on any database.
DECLARE @distributionDB AS sysname; SET @distributionDB = N'distribution'; -- Change the history retention period to 24 hours and the -- maximum retention period to 48 hours. USE distribution EXEC sp_changedistributiondb @distributionDB, N'history_retention', 24 EXEC sp_changedistributiondb @distributionDB, N'max_distretention', 48 GO

