Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSpropagateschematorepubs

  No additional text.


Syntax

create procedure sys.sp_MSpropagateschematorepubs
	@pubid		uniqueidentifier,
	@schema_text	nvarchar(4000),
	@schema_type int
AS
declare @pubid2			uniqueidentifier
declare @artid			uniqueidentifier
declare @fulltext		nvarchar(4000)
declare @retcode		int
declare @schemaversion			int
declare @schemaguid				uniqueidentifier
declare @schematext				nvarchar(2000)

set nocount on

	-- Find republications and add the same schema change
	declare #per_publication CURSOR LOCAL FAST_FORWARD for select pubid
		from dbo.sysmergepublications p where LOWER(publisher)=LOWER(publishingservername()) and publisher_db=db_name() and
			exists (select * from dbo.sysmergearticles a1, dbo.sysmergearticles a2 where
					a1.pubid = p.pubid and a2.pubid = @pubid and a1.objid = a2.objid)
	open #per_publication		
	fetch #per_publication into @pubid2
	while @@fetch_status<>-1
		begin
		select @schemaversion = 1 + max(schemaversion) from dbo.sysmergeschemachange
		if (@schemaversion is NULL)
			set @schemaversion = 1
		set @schemaguid = newid()
		set @artid = newid()
		select @fulltext = @schema_text + ' ''' + convert(nchar(36),@pubid2) + ''''
		exec @retcode=sys.sp_MSinsertschemachange @pubid2, @artid, @schemaversion, @schemaguid, @schema_type, @fulltext
		if @@ERROR<>0 or @retcode<>0
			begin
			close #per_publication
			deallocate #per_publication
			return (1)
		
			end
		fetch next from #per_publication into @pubid2
		end
	close #per_publication
	deallocate #per_publication
	return (0)

 
Last revision 2008RTM
See also

  sp_MSdrop_rladmin (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