sp_changedistributiondb (języka Transact-SQL)

Zmienia właściwości baza danych dystrybucji.Ta procedura składowana jest wykonywany na dystrybutora na dowolnej bazy danych.

Ikona łącza do tematuKonwencje składni Transact-SQL

Składnia

sp_changedistributiondb [ @database= ] 'database' 
    [ , [ @property= ] 'property' ] 
    [ , [ @value= ] 'value' ]

Argumenty

  • [ @ bazy danych = 'bazy danych"
    Is the name of the distribution database.database is sysname, with no default.

  • [ @ Właściwość = 'właściwość"
    Is the property to change for the given database.property is sysname, and can be one of these values.

    Wartość

    Opis

    history_retention

    Okres przechowywania historii tabela.

    max_distretention

    Maksymalna okres przechowywania dystrybucji.

    min_distretention

    Minimum okres przechowywania dystrybucji.

    NULL(default)

    Wszystkie dostępne Właściwość wartości są drukowane.

  • [ @ wartość = 'wartość"
    Is the new value for the specified property.value is nvarchar(255), with a default of NULL.

Wartości kodów powrotnych

0 (sukces) lub 1 (błąd)

Uwagi

sp_changedistributiondb jest używana we wszystkich typach replikacja.

Przykład

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 

Uprawnienia

Tylko członkowie sysadmin stała rola serwera można wykonać sp_changedistributiondb.