sp_deletetracertokenhistory (języka Transact-SQL)

Usuwa rekordy token śledzący z MStracer_tokens (Transact-SQL) i MStracer_history (Transact-SQL) tabele systemowe.Ta procedura składowana jest wykonywany Wydawca baza danych publikacji lub dystrybutora do baza danych dystrybucji.

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

Składnia

sp_deletetracertokenhistory [ @publication = ] 'publication' 
    [ , [ @tracer_id = ] tracer_id ]
    [ , [ @cutoff_date = ] cutoff_date ]
    [ , [ @publisher = ] 'publisher' ] 
    [ , [ @publisher_db = ] 'publisher_db' ]

Argumenty

  • [ @publication= ] 'publication'
    Is the name of the publication in which the tracer token was inserted.publication is sysname, with no default.

  • [ @tracer_id= ] tracer_id
    Is the ID of the tracer token to delete.tracer_id is int, with a default value of NULL.Jeśli null, a następnie usuwane są wszystkie tokeny oledzenia należące do publikacja.

  • [ @cutoff_date= ] cutoff_date
    Specifies a cutoff date such that all tracer tokens inserted into the publication before that date are removed.cutoff_date is datetime, with a default value of NULL.

  • [ @publisher= ] 'publisher'
    The name of the Publisher.publisher is sysname, with a default of NULL.

    Ostrzeżenie

    This parameter should only be specified for non-Microsoft SQL Server Publishers.

  • [ @publisher_db= ] 'publisher_db'
    The name of the publication database.publisher_db is sysname, with a default value of NULL.Ten parametr jest ignorowany, jeśli procedura składowana jest wykonywany na Wydawca.

Wartości kodów powrotnych

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

Uwagi

sp_deletetracertokenhistory w replikacja transakcyjna.

Podczas wykonywania sp_deletetracertokenhistory, można określić tylko jedną z tracer_id lub cutoff_date.Błąd występuje, gdy oba parametry.

Jeśli nie wykonać sp_deletetracertokenhistory usunąć metadane token śledzący, informacje zostaną usunięte po wystąpieniu Oczyszczanie historia zaplanowany.

Identyfikatory token śledzenia można ustalić poprzez wykonywanie sp_helptracertokens (języka Transact-SQL) lub za pomocą kwerendy MStracer_tokens (Transact-SQL) tabela systemowa.

Uprawnienia

Tylko członkowie sysadmin stałej roli serwera db_owner ustaloną rolę bazy danych w baza danych publikacja, lub db_owner stałej bazy danych lub replmonitor role baza danych dystrybucji można wykonać sp_deletetracertokenhistory.