Ócáid
Mar 31, 11 PM - Apr 2, 11 PM
An ócáid foghlama SQL, Fabric and Power BI is mó. Márta 31 – 2 Aibreán. Bain úsáid as cód FABINSIDER chun $ 400 a shábháil.
Cláraigh inniuNí thacaítear leis an mbrabhsálaí seo a thuilleadh.
Uasghrádú go Microsoft Edge chun leas a bhaint as na gnéithe is déanaí, nuashonruithe slándála, agus tacaíocht theicniúil.
Applies to:
SQL Server
Azure SQL Managed Instance
Changes the properties of the distribution database. This stored procedure is executed at the Distributor on any database.
Transact-SQL syntax conventions
sp_changedistributiondb
[ @database = ] N'database'
[ , [ @property = ] N'property' ]
[ , [ @value = ] N'value' ]
[ ; ]
The name of the distribution database. @database is sysname, with no default.
The property to change for the given database. @property is sysname, and can be one of these values.
Value | Description |
---|---|
history_retention |
History table retention period. |
max_distretention |
Maximum distribution retention period. |
min_distretention |
Minimum distribution retention period. |
NULL (default) |
All available @property values are printed. |
The new value for the specified property. @value is nvarchar(255), with a default of NULL
.
0
(success) or 1
(failure).
sp_changedistributiondb
is used in all types of replication.
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
Only members of the sysadmin fixed server role can execute sp_changedistributiondb
.
Ócáid
Mar 31, 11 PM - Apr 2, 11 PM
An ócáid foghlama SQL, Fabric and Power BI is mó. Márta 31 – 2 Aibreán. Bain úsáid as cód FABINSIDER chun $ 400 a shábháil.
Cláraigh inniu