sp_add_agent_profile (języka Transact-SQL)

Tworzy nowy profil dla agenta replikacja.Ta procedura składowana jest wykonywany na dystrybutora na dowolnej bazy danych.

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

Składnia

sp_add_agent_profile [ [ @profile_id= ] profile_id OUTPUT ]
        , [ @profile_name= ] 'profile_name' 
        , [ @agent_type= ] 'agent_type' ] 
    [ , [ @profile_type= ] profile_type ]
    [ , [ @description= ] 'description' ]
    [ , [ @default= ] default ]

Argumenty

  • [ @ profile_id = profile_id
    Is the ID associated with the newly inserted profile.profile_id is int and is an optional OUTPUT parameter.Jeśli określony, wartość jest zestaw do nowego profilu identyfikatora.

  • [ @ nazwa_profilu = 'profile_name"
    Is the name of the profile.profile_name is sysname, with no default.

  • [ @ agent_type = 'agent_type"
    Is the type of replication agent.agent_type is int, with no default, and can be one of these values.

    Wartość

    Opis

    1

    Agent migawki

    2

    Agent odczytywania dziennika

    3

    Agent dystrybucji

    4

    Scalanie Agent

    9

    Agent czytnik kolejki

  • [ @ profile_type = profile_type
    Is the type of profile.profile_type is int, with a default of 1.

    0 wskazuje profil systemu.1 wskazuje niestandardowy profil.Profile niestandardowe można tworzyć przy użyciu procedura składowana; Dlatego jest jedyną prawidłową wartością 1.Only Microsoft SQL Server creates system profiles.

  • [ @ Opis = 'description"
    Is a description of the profile.description is nvarchar(3000), with no default.

  • [ @ domyślne = default
    Wskazuje, czy profil domyślny dla agent_type*. defaultjest bit, domyślnie 0.*1 wskazuje, że profil dodawany staną się nowy profil domyślny dla agenta określonego przez agent_type.

Wartości kodów powrotnych

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

Uwagi

sp_add_agent_profile w replikacja migawka, replikacja transakcyjna i scalania replikacji.

Agent niestandardowych profilów są dodawane z domyślnymi wartościami parametrów agenta.Użyj sp_change_agent_parameter (języka Transact-SQL) do zmiany tych wartości domyślnych lub sp_add_agent_parameter (języka Transact-SQL) dodać dodatkowe parametry.

Gdy sp_add_agent_profile jest wykonywane, dodawany jest wiersz do nowego profilu niestandardowego w MSagent_profiles (Transact-SQL) tabela i skojarzone domyślne parametry dla tego profilu są dodawane do MSagent_parameters (Transact-SQL) tabela.

Uprawnienia

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