Aracılığıyla paylaş


sp_addsynctriggers (Transact-SQL)

Güncelleştirilebilir abonelikleri (hemen sıraya alınan ve anında güncelleme ile kuyruğa alınmış güncelleştirme yerine çalışma olarak) her tür ile kullanılan abone adresindeki tetikleyici oluşturur.Bu saklı yordam, abonelik veritabanı abone adresindeki yürütülür.

Önemli notÖnemli

The sp_script_synctran_commands procedure should be used instead of sp_addsynctrigger.sp_script_synctran_commands generates a script that contains the sp_addsynctrigger calls.

Konu bağlantısı simgesiTransact-sql sözdizimi kuralları

Sözdizimi

sp_addsynctriggers [ @sub_table = ] 'sub_table'
        , [ @sub_table_owner = ] 'sub_table_owner'
        , [ @publisher = ] 'publisher'
        , [ @publisher_db = ] 'publisher_db'
        , [ @publication = ] 'publication' 
        , [ @ins_proc = ] 'ins_proc' 
        , [ @upd_proc = ] 'upd_proc' 
        , [ @del_proc = ] 'del_proc' 
        , [ @cftproc = ] 'cftproc'
        , [ @proc_owner = ] 'proc_owner'
    [ , [ @identity_col = ] 'identity_col' ]
    [ , [ @ts_col = ] 'timestamp_col' ]
    [ , [ @filter_clause = ] 'filter_clause' ] 
        , [ @primary_key_bitmap = ] 'primary_key_bitmap'
    [ , [ @identity_support = ] identity_support ]
    [ , [ @independent_agent = ] independent_agent ]
        , [ @distributor = ] 'distributor' 
    [ , [ @pubversion = ] pubversion

Bağımsız değişkenler

  • [ @sub_table=] 'sub_table'
    Is the name of the Subscriber table.sub_table is sysname, with no default.

  • [ @sub_table_owner=] 'sub_table_owner'
    Is the name of the owner of the Subscriber table.sub_table_owner is sysname, with no default.

  • [ @publisher=] 'publisher'
    Is the name of the Publisher server.publisher is sysname, with no default.

  • [ @publisher_db=] 'publisher_db'
    Is the name of the Publisher database.publisher_db is sysname, with no default.BOŞ, geçerli veritabanı kullanılır.

  • [ @publication=] 'publication'
    Is the name of the publication.Publication is sysname, with no default.

  • [ @ins_proc=] 'ins_proc'
    Is the name of the stored procedure that supports synchronous transaction inserts at the Publisher.ins_proc is sysname, with no default.

  • [ @upd_proc=] 'upd_proc'
    Is the name of the stored procedure that supports synchronous transaction updates at the Publisher.ins_proc is sysname, with no default.

  • [ @del_proc=] 'del_proc'
    Is the name of the stored procedure that supports synchronous transaction deletes at the Publisher.ins_proc is sysname, with no default.

  • [ @cftproc = ] 'cftproc'
    Is the name of the auto-generated procedure used by publications that allow queued updating.cftproc is sysname, with no default.Anında güncelleme izin yayınlar için bu değer null olur.Bu parametre kuyruklanmış güncelleme (kuyruğa alınmış güncelleştirme ve anında güncelleme ile kuyruğa alınmış güncelleştirme yerine çalışma olarak) izin yayınlar için geçerlidir.

  • [ @proc_owner = ] 'proc_owner'
    Specifies the user account in the Publisher under which all the auto-generated stored procedures for updating publication (queued and/or immediate) were created.proc_owner is sysname with no default.

  • [ @identity_col=] 'identity_col'
    Is the name of the identity column at the Publisher.identity_col is sysname, with a default of NULL.

  • [ @ts_col=] 'timestamp_col'
    Is the name of the timestamp column at the Publisher.timestamp_col is sysname, with a default of NULL.

  • [ @filter_clause=] 'filter_clause'
    Bir kısıtlamadır yatay bir filtre tanımlar (nerede) yan tümce tümce tümce.When entering the restriction clause, omit the keyword WHERE.filter_clauseis nvarchar(4000), with a default of NULL.

  • [ @primary_key_bitmap =] 'primary_key_bitmap'
    Is a bit map of the primary key columns in the table.primary_key_bitmap is varbinary(4000), with no default.

  • [ @identity_support = ] identity_support
    Enables and disables automatic identity range handling when queued updating is used.identity_support is a bit, with a default of 0.0 hiçbir kimlik olduğu anlamına gelir desteği, aralık 1 otomatik kimlik aralığı işlenmesini sağlar.

  • [ @independent_agent = ] independent_agent
    Bu yayın için tek bir dağıtım Aracısı (bağımsız Aracısı) ya da başına bir dağıtım aracısı olup olmadığını gösterir yayın veritabanı ve abonelik veritabanı çifti (paylaşılan Aracısı).This value reflects the value of the independent_agent property of the publication defined at the Publisher.independent_agent is a bit with a default of 0.If 0, the agent is a Shared Agent.If 1, the agent is an independent agent.

  • [ @distributor = ] 'distributor'
    Is the name of the Distributor.distributor is sysname, with no default.

  • [ @ pubversion=] pubversion
    Indicates the version of the Publisher.pubversion is int, with a default of 1.1 means that the Publisher version is Microsoft SQL Server 2000 Service Pack 2 or earlier; 2 means that the Publisher is SQL Server 2000 Service Pack 3 (SP3) or later.pubversion must be explicitly set to 2 when the Publisher version is SQL Server 2000 SP3 or later.

Dönüş Kodu Değerleri

0 (başarılı) veya 1 (başarısız)

Açıklamalar

sp_addsynctriggers , abonelik başlatma işleminin bir parçası olarak Dağıtım Aracısı tarafından kullanılır.Bu saklı yordam kullanıcılar tarafından yaygın olarak çalışmaz, ancak kullanıcının gerekiyorsa yararlı olabilir küme no eşitleme abonelik el ile ayarlayın.

İzinler

Yalnızca üyeleri sysadmin sabit sunucu rolü veya db_owner sabit veritabanı rolü olabilir yürütmek sp_addsynctriggers.