Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MStran_alterview

  No additional text.


Syntax
create procedure sys.sp_MStran_alterview
(
	@qual_object_name nvarchar(512) --qualified 3-part-name			
	,@objid	int
	,@pass_through_scripts nvarchar(max)
	,@target_object_name nvarchar(512) = NULL
)
AS
	set nocount on

	declare @tran_artid int
			,@artname sysname
			,@pubname sysname
			,@retcode int
			,@subscription_active int

	select @subscription_active = 2
		,@retcode = 0


	begin tran sp_MStran_alterview
	save tran sp_MStran_alterview

	-- disallow alter indexed view replicated as table, otherwise pub/sub can get out of sync
	-- (the only time a vew exists in sysarticles is when indexed view is replicated as table)
	if exists (select * from sysarticles where objid = @objid)
	begin
		raiserror(21725, 16, -1)
		goto FAILURE
	end
	
	--loop through schema only publications/articles
	exec @retcode = sys.sp_MStran_alterschemaonly @qual_object_name = @qual_object_name
												,@objid = @objid
												,@pass_through_scripts = @pass_through_scripts
	if @retcode <>0 or @@ERROR<>0
		goto FAILURE


		
	commit tran sp_MStran_alterview
	return 0

FAILURE:
	rollback tran sp_MStran_alterview
	commit tran
	return 1

 
Last revision 2008RTM
See also

  sp_MSdrop_repltran (Procedure)
sp_MStran_ddlrepl (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