Share via


sp_addpushsubscription_agent (Transact-SQL)

gönderme temelli abonelik iş yayınına eşitlemek için kullanılan yeni bir zamanlanmış Aracısı iş ekler.Bu saklı yordam, yayın Veritabanı yayımcısına sırasında yürütülür.

Security noteSecurity Note:

Yayımcı, uzak Dağıtımcı, tüm parametreleri için sağlanan değerler ile yapılandırılırken dahil job_login ve job_password, dağıtıcı düz metin olarak gönderilir. Bu saklı yordamını çalıştırmadan önce yayımcısına uzak Dağıtımcı arasındaki bağlantı şifreleme.Daha fazla bilgi için bkz: SQL Server bağlantıları için şifreleme.

Topic link iconTransact-SQL sözdizimi kuralları

sp_addpushsubscription_agent [ @publication= ] 'publication'
    [ , [ @subscriber = ] 'subscriber' ]
    [ , [ @subscriber_db = ] 'subscriber_db' ]
    [ , [ @subscriber_security_mode = ] subscriber_security_mode ]
    [ , [ @subscriber_login = ] 'subscriber_login' ]
    [ , [ @subscriber_password = ] 'subscriber_password' ]
    [ , [ @job_login = ] 'job_login' ] 
    [ , [ @job_password = ] 'job_password' ] 
    [ , [ @job_name = ] 'job_name' ] 
    [ , [ @frequency_type = ] frequency_type ]
    [ , [ @frequency_interval = ] frequency_interval ]
    [ , [ @frequency_relative_interval = ] frequency_relative_interval ]
    [ , [ @frequency_recurrence_factor = ] frequency_recurrence_factor ]
    [ , [ @frequency_subday = ] frequency_subday ]
    [ , [ @frequency_subday_interval = ] frequency_subday_interval ]
    [ , [ @active_start_time_of_day = ] active_start_time_of_day ]
    [ , [ @active_end_time_of_day = ] active_end_time_of_day ]
    [ , [ @active_start_date = ] active_start_date ]
    [ , [ @active_end_date = ] active_end_date ]
    [ , [ @dts_package_name = ] 'dts_package_name' ]
    [ , [ @dts_package_password = ] 'dts_package_password' ]
    [ , [ @dts_package_location = ] 'dts_package_location' ]
    [ , [ @enabled_for_syncmgr = ] 'enabled_for_syncmgr' ]
    [ , [ @distribution_job_name = ] 'distribution_job_name' ]
    [ , [ @publisher = ] 'publisher' ]
    [ , [ @subscriber_provider = ] 'subscriber_provider' ] 
    [ , [ @subscriber_datasrc = ] 'subscriber_datasrc' ] 
    [ , [ @subscriber_location = ] 'subscriber_location' ]
    [ , [ @subscriber_provider_string = ] 'subscriber_provider_string' ] 
    [ , [ @subscriber_catalog = ] 'subscriber_catalog' ]

Bağımsız değişkenler

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

  • [ @subscriber =] 'subscriber'
    Is the name of the Subscriber.subscriber is sysname, with a default of NULL.

  • [ @subscriber_db =] 'subscriber_db'
    Is the name of the subscription database.subscriber_db is sysname, with a default of NULL.Için bir SQL Server dışındaki abone, değeri belirtin. (varsayılan hedef) for subscriber_db.

  • [ @subscriber_security_mode =] subscriber_security_mode
    Is the security mode to use when connecting to a Subscriber when synchronizing.subscriber_security_mode is int, with a default of 1.0 belirtir.SQL Server Kimlik doğrulaması. 1 Windows kimlik doğrulamasını belirtir.

    Security noteSecurity Note:

    Kuyruğa Alınmış Güncelleştirme Aboneliği kullanın. SQL Server Bağlantılar için aboneleri, kimlik doğrulaması ve bağlantı her abone için farklı bir hesap belirtin. Diğer tüm abonelikler için Windows kimlik doğrulaması kullanın.

  • [ @subscriber_login =] 'subscriber_login'
    Abone oturumu için bir abonelik eşitlerken bağlanırken kullanılacak iş. subscriber_login olan sysname, varsayılan değeri NULL ile.

  • [ @subscriber_password =] 'subscriber_password'
    Is the Subscriber password.subscriber_password is required if subscriber_security_mode is set to 0.subscriber_password is sysname, with a default of NULL.Abone parola kullanılırsa, otomatik olarak şifrelenir.

    Security noteSecurity Note:

    Boş parola kullanmayın.Güçlü bir parola kullanın.Olanaklıysa, zamanında güvenlik kimlik bilgileri bilgilerini girmesini ister.kimlik bilgileri bilgilerini bir komut dosyasında depolamak, yetkisiz erişimi engellemek için dosyanın güvenli olmalıdır.

  • [ @job_login = ] 'job_login'
    Is the login for the Windows account under which the agent runs.job_login is nvarchar(257), with a default value of NULL.Bu Windows hesabı her zaman dağıtımcı Aracısı bağlantılarında ve bağlantılar için abone tümleşik Windows kimlik doğrulaması kullanıldığında kullanılır.

  • [ @job_password = ] 'job_password'
    Is the password for the Windows account under which the agent runs.job_password is sysname, with no default.

    Security noteSecurity Note:

    Olanaklıysa, zamanında güvenlik kimlik bilgileri bilgilerini girmesini ister.kimlik bilgileri bilgilerini bir komut dosyasında depolamak, yetkisiz erişimi engellemek için dosyanın güvenli olmalıdır.

  • [ @job_name = ] 'job_name'
    Is the name of an existing agent job.job_name is sysname, with a default value of NULL.Bu parametre, yalnızca yeni oluşturulan iş (varsayılan) yerine varolan bir işi'ni kullanarak, aboneliğin eşitlenir, belirtilmedi.Üyesi değilseniz, sysadmin sabit sunucu rolü, belirtmelisinizjob_login ve job_password belirttiğiniz zaman job_name.

  • [ @frequency_type = ] frequency_type
    Is the frequency with which to schedule the Distribution Agent.frequency_type is int, and can be one of the following values.

    Değer

    Açıklama

    1

    saat

    2

    Isteğe bağlı

    4

    Günlük

    8

    Haftalık

    16

    Aylık

    32

    Aylık göreli

    64 (varsayılan)

    Otomatik başlatma

    128

    Yinelenen

    Not

    Değeri, belirleme 64 dağıtım aracı sürekli modunda çalışmasına neden olur.Bu ayara karşılık gelir -Sürekli aracı ile ilgili parametre.Daha fazla bilgi için bkz: Distribution Agent çoğaltma.

  • [ @frequency_interval = ] frequency_interval
    Is the value to apply to the frequency set by frequency_type.frequency_interval is int, with a default of 1.

  • [ @frequency_relative_interval = ] frequency_relative_interval
    Distribution Agent tarihidir.This parameter is used when frequency_type is set to 32 (monthly relative).frequency_relative_interval is int, and can be one of the following values.

    Değer

    Açıklama

    1 (varsayılan)

    First

    2

    Ikinci

    4

    Üçüncü

    8

    Dördüncü

    16

    Last

  • [ @frequency_recurrence_factor = ] frequency_recurrence_factor
    Is the recurrence factor used by frequency_type.frequency_recurrence_factor is int, with a default of 0.

  • [ @frequency_subday = ] frequency_subday
    Is how often to reschedule during the defined period.frequency_subday is int, and can be one of the following values.

    Değer

    Açıklama

    1

    Bir kez

    2

    Ikinci

    4 (varsayılan)

    Dakika

    8

    Saat

  • [ @frequency_subday_interval = ] frequency_subday_interval
    Is the interval for frequency_subday.frequency_subday_interval is int, with a default of 5.

  • [ @active_start_time_of_day = ] active_start_time_of_day
    Is the time of day when the Distribution Agent is first scheduled, formatted as HHMMSS.active_start_time_of_day is int, with a default of 0.

  • [ @active_end_time_of_day = ] active_end_time_of_day
    Is the time of day when the Distribution Agent stops being scheduled, formatted as HHMMSS.active_end_time_of_day is int, with a default of 235959.

  • [ @active_start_date = ] active_start_date
    Is the date when the Distribution Agent is first scheduled, formatted as YYYYMMDD.active_start_date is int, with a default of 0.

  • [ @active_end_date = ] active_end_date
    Is the date when the Distribution Agent stops being scheduled, formatted as YYYYMMDD.active_end_date is int, with a default of 99991231.

  • [ @dts_package_name = ] 'dts_package_name'
    Specifies the name of the Data Transformation Services (DTS) package.dts_package_name is a sysname with a default of NULL.Örneğin, paketinin adını belirlemek için DTSPub_Package, parametre olabilir @dts\_package\_name = N'DTSPub_Package'.

  • [ @dts_package_password = ] 'dts_package_password'
    Specifies the password required to run the package.dts_package_password is sysname with a default of NULL.

    Not

    Varsa bir parola belirtmelisiniz dts_package_name belirtildi.

  • [ @dts_package_location = ] 'dts_package_location'
    Specifies the package location.dts_package_location is a nvarchar(12), with a default of DISTRIBUTOR.Paket konumu olabilir dağıtımcı or abone.

  • [ @enabled_for_syncmgr = ] 'enabled_for_syncmgr'
    Is whether the subscription can be synchronized through Microsoft Synchronization Manager.enabled_for_syncmgr is nvarchar(5), with a default of FALSE.If false, Eşitleme Yöneticisi ile abonelik kayıtlı değil. If true, aboneliğin Eşitleme Yöneticisi ile kaydedilir ve başlatmadan eşitlenebilir SQL Server Management Studio.

  • [ @distribution_job_name = ] 'distribution_job_name'
    Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.

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

  • [ @subscriber_provider= ] 'subscriber_provider'
    Is the unique programmatic identifier (PROGID) with which the OLE DB provider for the non-SQL Server data source is registered.subscriber_provider is sysname, with default value of NULL.subscriber_provider must be unique for the OLE DB provider installed on the Distributor.subscriber_provider is only supported for non-SQL Server Subscribers.

  • [ @subscriber_datasrc= ] 'subscriber_datasrc'
    Is the name of the data source as understood by the OLE DB provider.subscriber_datasrc is nvarchar(4000), with a default value of NULL.subscriber_datasrc is passed as the DBPROP_INIT_DATASOURCE property to initialize the OLE DB provider.subscriber_datasrc is only supported for non-SQL Server Subscribers.

  • [ @subscriber_location= ] 'subscriber_location'
    Is the location of the database as understood by the OLE DB provider.subscriber_location is nvarchar(4000), with a default value of NULL.subscriber_location is passed as the DBPROP_INIT_LOCATION property to initialize the OLE DB provider.subscriber_location is only supported for non-SQL Server Subscribers.

  • [ @subscriber_provider_string= ] 'subscriber_provider_string'
    Is the OLE DB provider-specific connection string that identifies the data source.subscriber_provider_string is nvarchar(4000), with a default value of NULL.subscriber_provider_string is passed to IDataInitialize or set as the DBPROP_INIT_PROVIDERSTRING property to initialize the OLE DB provider.subscriber_provider_string is only supported for non-SQL Server Subscribers.

  • [ @subscriber_catalog= ] 'subscriber_catalog'
    Is the catalog to be used when making a connection to the OLE DB provider.subscriber_catalog is sysname, with default value of NULL.subscriber_catalog is passed as the DBPROP_INIT_CATALOG property to initialize the OLE DB provider.subscriber_catalog is only supported for non-SQL Server Subscribers.

Dönüş Kodu Değerleri

0 (başarılı) veya 1 (hata)

Remarks

sp_addpushsubscription_agent işlem çoğaltma anlık görüntü çoğaltması çoğaltması de kullanılır.

İzinler

Yalnızca üyeleri sysadmin sabit sunucu rolü veya db_owner sabit veritabanı rolü çalıştırabilirsinizsp_addpushsubscription_agent.