Aracılığıyla paylaş


sp_changesubstatus (Transact-SQL)

Varolan bir abone durumunu değiştirir.Bu saklı yordam, yayın Veritabanı yayımcısına sırasında yürütülür.

Topic link iconTransact-SQL sözdizimi kuralları

sp_changesubstatus [ [ @publication = ] 'publication' ]
    [ , [ @article = ] 'article' ]
    [ , [ @subscriber = ] 'subscriber' ]
        , [ @status = ] 'status'
    [ , [ @previous_status = ] 'previous_status' ]
    [ , [ @destination_db = ] 'destination_db' ]
    [ , [ @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 ]
    [ , [ @optional_command_line = ] 'optional_command_line' ]
    [ , [ @distribution_jobid = ] distribution_jobid ]
    [ , [ @from_auto_sync = ] from_auto_sync ]
    [ , [ @ignore_distributor = ] ignore_distributor ]
    [ , [ @offloadagent= ] remote_agent_activation ]
    [ , [ @offloadserver= ] 'remote_agent_server_name' ]
    [ , [ @dts_package_name= ] 'dts_package_name' ]
    [ , [ @dts_package_password= ] 'dts_package_password' ]
    [ , [ @dts_package_location= ] dts_package_location ]
    [ , [ @skipobjectactivation = ] skipobjectactivation
  [ , [ @distribution_job_name= ] 'distribution_job_name' ]
    [ , [ @publisher = ] 'publisher' ]

Bağımsız değişkenler

  • [ @publication=] 'publication'
    Is the name of the publication.publication is sysname, with a default of %.If publication belirtilmemişse, tüm yayınları etkilenir.

  • [ @article=] 'article'
    makale adıdır.It must be unique to the publication.article is sysname, with a default of %.If article belirtilmemişse, tüm makalelerin etkilenir.

  • [ @subscriber=] 'subscriber'
    Is the name of the Subscriber to change the status of.subscriber is sysname, with a default of %.If subscriber belirtilmemişse, durumu, belirtilen makaleye tüm abonelere yönelik değiştirilir.

  • [ @status =] 'status'
    Is the subscription status in the syssubscriptions table.status is sysname, with no default, and can be one of these values.

    Değer

    Açıklama

    Etkin

    Abone eşitlenir ve veri alınıyor.

    etkin olmayan

    Bir abonelik abone girişi var.

    abone

    Abone veriler istiyor, ancak henüz eşitlenmedi.

  • [ @previous_status=] 'previous_status'
    Is the previous status for the subscription.previous_status is sysname, with a default of NULL.Bu parametre bu durum, böylece grup işlevlerini abonelikler belirli bir dizi izin vererek, geçerli olan tüm abonelikler değiştirmenize izin verir (örneğin, tüm etkin ayarını abonelikler geri abone).

  • [ @destination_db=] 'destination_db'
    Is the name of the destination database.destination_db is sysname, with a default of %.

  • [ @frequency_type=] frequency_type
    Is the frequency with which to schedule the distribution task.frequency_type is int, with a default of NULL.

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

  • [ @frequency_relative_interval=] frequency_relative_interval
    Görevin dağıtım tarihidir.This parameter is used when frequency_type is set to 32 (monthly relative).frequency_relative_interval is int, and can be one of these values.

    Değer

    Açıklama

    1

    First

    2

    Ikinci

    4

    Üçüncü

    8

    Dördüncü

    16

    Last

    NULL(default)

     

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

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

    Değer

    Açıklama

    1

    Bir kez

    2

    Ikinci

    4

    Dakika

    8

    Saat

    NULL(default)

     

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

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

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

  • [ @active_start_date=] active_start_date
    Is the date when the distribution task is first scheduled, formatted as YYYYMMDD.active_start_date is int, with a default of NULL.

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

  • [ @optional_command_line=] 'optional_command_line'
    Is an optional command prompt.optional_command_line is nvarchar(4000), with a default of NULL.

  • [ @distribution_jobid=] distribution_jobid
    Proje sırasında aboneliğin dağıtımcı dağıtım aracı abonelik durumu devre dışı ' etkin olarak değiştirilirken kimliğidir.Diğer durumlarda, bunu tanımlanmadı.If more than one Distribution Agent is involved in a single call to this stored procedure, the result is not defined.distribution_jobid is binary(16), with a default of NULL.

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

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

  • [ @offloadagent= ] remote_agent_activation

    Not

    Uzaktaki Aracı etkinleştirme onaylanmaz ve artık desteklenmiyor.Bu parametre, yalnızca geriye dönük uyumluluk komut dosyaları korumak için desteklenir.Ayarı remote_agent_activation dışında bir değer 0 hata üretir.

  • [ @offloadserver= ] 'remote_agent_server_name'

    Not

    Uzaktaki Aracı etkinleştirme onaylanmaz ve artık desteklenmiyor.Bu parametre, yalnızca geriye dönük uyumluluk komut dosyaları korumak için desteklenir.Ayarı remote_agent_server_name DEĞERSIZ olmayan herhangi bir değer için bir hata üretir.

  • [ @ 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, adlı bir paket DTSPub_Package belirttiğiniz@dts_package_name = N'DTSPub_Package'.

  • [ @ dts_package_password= ] 'dts_package_password'
    Specifies the password on the package.dts_package_password is sysname with a default of NULL, which specifies that the password property is to be left unchanged.

    Not

    Bir DTS paketini bir parolası olması gerekir.

  • [ @ dts_package_location= ] dts_package_location
    Specifies the package location.dts_package_location is an int, with a default of 0.If 0dağıtımcı paket konumdur.If 1, Abone tarafında paket konumdur.Paket konumu olabilir dağıtımcı or abone.

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

  • [ @distribution_job_name= ] 'distribution_job_name'
    Is the name of the distribution job.distribution_job_name is sysname, with a default of NULL.

  • [ Yayımcı'ın = ] 'publisher'
    Specifies a non-Microsoft SQL Server Publisher.publisher is sysname, with a default of NULL.

    Not

    publisher üzerinde makale özelliklerini değiştirirken kullanılmamalıdır bir SQL Server Yayımcı.

Dönüş Kodu Değerleri

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

Remarks

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

sp_changesubstatus abone durumunu değiştirirsyssubscriptions tablo ile değiştirilmiş statü.Gerekirse, makale durumunda güncelleştirmeleri sysarticles tablo etkin veya devre dışı'nı gösterir.Gerekirse, çoğaltma bayrağını veya devre dışı ayarlar sysobjects tablo yinelenen tablo için.

İzinler

Yalnızca üyeleri sysadmin sabit sunucu rolüdb_owner sabit veritabanı rolü veya aboneliğin oluşturucusunu kullanabilirsiniz yürütmek sp_changesubstatus.