Getting error when synchronizing Subscriber!
i new sql server, quick learn , know find answers. however, have found issue on , other forums , have tried solutions , still getting failure. following error get:
the schema script 'ap_onepermissidbf20687_253.sch' not propagated subscriber. (source: mssql_repl, error number: mssql_repl-2147201001)
help: http://help/mssql_repl-2147201001
invalid column name 'companyid'. (source: mssqlserver, error number: 207)
help: http://help/207
it appears tables , views , copying over, never able full sync done without running these errors.
to give quick background, have 2 newly built sql servers restored backup of database onto distributor/publisher server. have gone through distribution wizard , publication wizard , snapshot creates no issues. have set replication location shared unc name , can access terminal using log in using process login.
any appreciated have been slamming head against same wall on week now. if more info needed happy supply that.
thanks,
robert
try running proc find errors in procs. recompile , report errors.
create proc [dbo].[usp_refreshallprocs] set nocount on; -- table variable store procedure names declare @v table (recid int identity(1,1), spname sysname) -- retrieve list of stored procedures insert @v(spname) select '[' + s.[name] + '].[' + sp.name + ']' from sys.procedures sp inner join sys.schemas s on s.schema_id = sp.schema_id where is_ms_shipped = 0 and sp.name not 'sp_ms%' order s.[name], sp.name -- counter variables declare @cnt int, @tot int select @cnt = 1 select @tot = count(*) @v declare @spname sysname -- start loop while @cnt <= @tot begin select @spname = spname from @v where recid = @cnt print 'refreshing...' + @spname begin try -- refresh stored procedure exec sp_refreshsqlmodule @spname end try begin catch print ' validation failed : ' + @spname + ', error:' + error_message() if @@trancount > 0 rollback tran end catch set @cnt = @cnt + 1 end
SQL Server > SQL Server Replication
Comments
Post a Comment