Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSactivateprocedureexecutionarticleobject

  No additional text.


Syntax

-- Name: sp_MSactivateprocedureexecutionarticleobject

-- Description: This procedure is called by the snapshot agent to activate
--              a single procedure execution article object.

-- Parameters: @qualified_procedure_execution_object_name
--             @is_repl_serializable_only

-- Notes: This procedure must be called within a user transaction or it will
--        result in a no-op.

-- Security: Public interface object, will result in no-op if called by
--           non-db_owner or non-replication agent.
-- Requires Certificate signature for catalog access

create procedure sys.sp_MSactivateprocedureexecutionarticleobject (
    @qualified_procedure_execution_object_name nvarchar(517),
    @is_repl_serializable_only bit
    )
as
begin
    set nocount on

    if @@trancount < 1 return 1

    if sessionproperty('replication_agent') <> 1 return 1

    if object_id(N'dbo.syspublications', 'U') is null return 1

    declare @retcode int
          , @is_execution_replicated bit
          , @current_is_repl_serializable_only bit
          , @object_id int
          , @error int
    set @retcode = 0

    exec @retcode = sys.sp_MSreplcheck_publish
    if @@error <> 0 or @retcode <> 0
        return 1

    set @object_id = object_id(@qualified_procedure_execution_object_name)
    select @is_execution_replicated = is_execution_replicated
         , @current_is_repl_serializable_only = is_repl_serializable_only
      from sys.procedures
     where object_id = @object_id

    if @is_execution_replicated = 0 or
       @current_is_repl_serializable_only = 0 and @is_repl_serializable_only = 1
    begin
        exec %%Object(MultiName = @qualified_procedure_execution_object_name).LockMatchID(ID = @object_id, Exclusive = 1, BindInternal = 0)
        set @error = @@error if @error <> 0 begin raiserror(@error, 16, -1) return 1 end
        exec %%Module(ID = @object_id).SetProcReplicated(Value = 1)
        set @error = @@error if @error <> 0 begin raiserror(@error, 16, -1) return 1 end
        if @is_repl_serializable_only = 1
        begin
            exec %%Module(ID = @object_id).SetProcReplSerialOnly(Value = 1)
            set @error = @@error if @error <> 0 begin raiserror(@error, 16, -1) return 1 end
        end
    end

    return 0
end

 
Last revision 2008RTM
See also

  sp_MSdrop_repltran (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash