Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSpostapplyscript_forsubscriberprocs

  No additional text.


Syntax
-- This proc is called by the .prc file to mark merge replication objects as system objects.
create procedure sys.sp_MSpostapplyscript_forsubscriberprocs    (
    @procsuffix sysname)

as
begin
    declare @retcode        smallint
    declare @procname       nvarchar(400)
    declare @ownername      nvarchar(140)
    declare @destowner      nvarchar(140)
    declare @ins_procname   nvarchar(258)
    declare @ins_batch_procname nvarchar(258)
    declare @upd_procname   nvarchar(258)
    declare @upd_batch_procname nvarchar(258)
    declare @sel_procname nvarchar(258)
    declare @sel_metadata_procname nvarchar(258)
    declare @del_procname nvarchar(258)
    declare @conflict_proc nvarchar(258)

    set nocount on
    /*
    ** Check to see if current publication has permission
    */
    exec @retcode=sys.sp_MSreplcheck_subscribe
    if @retcode<>0 or @@ERROR<>0 return (1)

    select @ins_procname = quotename('MSmerge_ins_sp_' + @procsuffix)
    select @ins_batch_procname = quotename('MSmerge_ins_sp_' + @procsuffix + '_batch')
    select @upd_procname = quotename('MSmerge_upd_sp_' + @procsuffix)
    select @upd_batch_procname = quotename('MSmerge_upd_sp_' + @procsuffix + '_batch')
    select @del_procname = quotename('MSmerge_del_sp_' + @procsuffix)
    select @sel_procname = quotename('MSmerge_sel_sp_' + @procsuffix)
    select @sel_metadata_procname = quotename('MSmerge_sel_sp_' + @procsuffix + '_metadata')
    select @conflict_proc = quotename('MSmerge_cft_sp_' + @procsuffix)

	select @procname = @ins_procname
	if object_id(@ins_procname ,'P') is not NULL
	begin
	    exec sys.sp_MS_marksystemobject @procname	
	    exec ('grant exec on ' + @procname + ' to public')
    end
	
    select @procname = @ins_batch_procname
	if object_id(@ins_batch_procname ,'P') is not NULL
	begin
	    exec sys.sp_MS_marksystemobject @procname	
	    exec ('grant exec on ' + @procname + ' to public')
    end

    select @procname = @upd_procname
	if object_id(@upd_procname ,'P') is not NULL
	begin
	    exec sys.sp_MS_marksystemobject @procname	
	    exec ('grant exec on ' + @procname + ' to public')
    end

    select @procname = @upd_batch_procname
	if object_id(@upd_batch_procname ,'P') is not NULL
	begin
	    exec sys.sp_MS_marksystemobject @procname	
	    exec ('grant exec on ' + @procname + ' to public')
    end

    select @procname = @del_procname
	if object_id(@del_procname ,'P') is not NULL
	begin
	    exec sys.sp_MS_marksystemobject @procname	
	    exec ('grant exec on ' + @procname + ' to public')
    end

    select @procname = @sel_procname
	if object_id(@sel_procname ,'P') is not NULL
	begin
	    exec sys.sp_MS_marksystemobject @procname	
	    exec ('grant exec on ' + @procname + ' to public')
    end

    select @procname = @sel_metadata_procname
	if object_id(@sel_metadata_procname ,'P') is not NULL
	begin
	    exec sys.sp_MS_marksystemobject @procname	
	    exec ('grant exec on ' + @procname + ' to public')
    end

    select @procname = @conflict_proc
	if object_id(@conflict_proc ,'P') is not NULL
	begin
	    exec sys.sp_MS_marksystemobject @procname	
	    exec ('grant exec on ' + @procname + ' to public')
    end
end

 
Last revision 2008RTM
See also

  sp_MSdrop_rlrecon (Procedure)
sp_MSscriptsubscriberprocs (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