Merge Replication - Not Working
Apr 11, 2007
Hi,
I have the following setup Merge replication with Web Synchronization:
Server: SQL Server 2005
Subscriber: SQL Server Express edition
The system uses parametrized filters based on HOST_NAME and I have selected 'Automatically define a partition and generate a snapshot when a new subscriber tries to synchronize'
To reduce the size of the initial snapshot I have selected to 'compress' the snapshot files.
It works fine in most of the cases but sometimes when I initialize a new subscriber, replication process fails with the error:
Message
Replication-Replication Merge Subsystem: agent 25BCC8D2-968E-4CEE-B408-2DEF3210F682 failed. The Merge Agent failed to retrieve the snapshot schema script file '\db101BQ_REPL_SHAREuncDB101_BQDB_QA_BQ_WEB_REPL20070411090593dynsnapvalidation.tok'. Run the Snapshot Agent to regenerate the snapshot files for this publication.
If I regenerate the snapshot for the subscriber, and then replicate again it works fine. This is turning out to be an issue as I have to compress the snapshot files as they are huge.
And I cannot use 'Initializing a subscription without snapshot' due to this error: <http://forums.microsoft.com/msdn/ShowPost.aspx?postid=1458147&siteid=1>
Help me
PS: (Applied SP2 Patch, but the problem still persists) and the process works fine if i use pusg subscription
For reference here is the t-sql subscription code, and the vb.net that initiates replication:
Code Snippet
use [BQ_DEV_CLIENT]
exec sp_addmergepullsubscription
@publisher = N'DB101-EQA-SCL',
@publication = N'BQ_PUB',
@publisher_db = N'BQDB',
@subscriber_type = N'Anonymous',
@subscription_priority = 0,
@description = N'',
@sync_type = N'Automatic'
GO
exec sp_addmergepullsubscription_agent
@publisher = N'DB101-EQA-SCL',
@publisher_db = N'BQDB',
@publication = N'BQ_PUB',
@distributor = N'DB101-EQA-SCL',
@distributor_security_mode = 1,
@distributor_login = N'user',
@distributor_password = N'user',
@enabled_for_syncmgr = N'False',
@alt_snapshot_folder = N'',
@working_directory = N'',
@use_ftp = N'False',
-- @job_login = null,
-- @job_password = null,
@publisher_security_mode = 1,
@publisher_login = N'user',
@publisher_password = N'user',
@use_interactive_resolver = N'False',
@dynamic_snapshot_location = N'',
@use_web_sync = 1,
@internet_url = N'https://company/BQREPL/replisapi.dll',
@internet_login = N'USIRU01',
@internet_password = N'pass',
@internet_security_mode = 0,
@internet_timeout = 1800,
@hostname = 'MY_MACHINE'
GO
VB.net code:
Dim subSqlCon As SqlConnection = New SqlConnection(m_subSqlConStr)
Dim pubSqlCon As SqlConnection = New SqlConnection(m_pubSqlConStr)
Dim subscriberConn As ServerConnection = New ServerConnection(subSqlCon)
Dim publisherConn As ServerConnection = New ServerConnection(pubSqlCon)
subscriberConn.Connect()
Dim subscription As MergePullSubscription = New MergePullSubscription(m_subscriberDBName, m_publisherMachineName, m_publisherDBName, m_publicationName, subscriberConn)
If subscription.LoadProperties() Then
If Not subscription.PublisherSecurity Is Nothing Then
Dim agent As MergeSynchronizationAgent = subscription.SynchronizationAgent
agent.DistributorSecurityMode = SecurityMode.Standard
agent.DistributorPassword = m_distributorPassword
agent.DistributorLogin = m_distributorUserName
agent.PublisherSecurityMode = SecurityMode.Standard
agent.PublisherPassword = m_publisherPassword
agent.PublisherLogin = m_publisherUserName
'Set the event handler to capture output messages
AddHandler agent.Status, New AgentCore.StatusEventHandler(AddressOf Me.agent_Status)
agent.Synchronize()
End if
View 10 Replies
ADVERTISEMENT
May 14, 2015
How to check if web merge sync is working between a subscriber and publisher thru HTTPS ? SQL port 1433 at subscriber is blocked so no direct connection to subscriber.
View 2 Replies
View Related
May 26, 2015
What is the main difference between snapshot and transactional and merge replication?
View 5 Replies
View Related
Aug 30, 2007
Hi all,
I know that adding a column using ALTER TABLE to add a column automatically allows SQLSERVER 2005 to replicate the schema changes to the subscribers, however, I would like to add a new column to an existing article that is being used for merge replication, however, I don't want this column to be replicated. Re-initialising the subscriptions is not a option. Help would be appreciated.
I am using SQLSERVER 2005 (SP1).
View 3 Replies
View Related
Oct 7, 2015
In a t-sql 2012 merge statement that is listed below, the insert statement on the merge statement listed below is not working. The update statement works though.
Merge test.dbo.LockCombination AS LKC1
USING
(select LKC.lockID,LKC.seq,A.lockCombo1,A.schoolnumber
from
[Inputtb] A
JOIN test.dbo.School SCH ON A.schoolnumber = SCH.type
JOIN test.dbo.Locker LKR ON SCH.schoolID = LKR.schoolID AND A.lockerNumber = LKR.number
[code]...
Thus would you tell me what I need to do to make the insert statement work on the merge statement listed above?
View 10 Replies
View Related
Mar 4, 2007
Hi all,
I'm trying delete metadata of a sql 2005 sp1 subscriber from a sql 2005 sp1 merge publication, but is not working, the "retention" parameter for the publication is 999 and this is the code I'm using:
declare @num_genhistory_rows int,
@num_contents_rows int,
@num_tombstone_rows int
declare @retcode smallint
--select count(*) from msmerge_contents
-- records before 2,633,848
exec @retcode = sys.sp_mergemetadataretentioncleanup @num_genhistory_rows OUTPUT , @num_contents_rows OUTPUT , @num_tombstone_rows OUTPUT
select retcode =@retcode
select num_genhistory_rows =@num_genhistory_rows
select num_contents_rows=@num_contents_rows
select num_tombstone_rows=@num_tombstone_rows
--select count(*) from msmerge_contents
-- records after 2,633,8
Results :
retcode
0
num_genhistory_rows
0
num_contents_rows
0
num_tombstone_rows
0
Has omebody any idea why this is not working ?
I did check "sp_mergemetadataretentioncleanup " and I note that is using a function to calculate the limit date, but I could not testing because it give me the below error :
declare @curdate datetime, @cutoffdate datetime
select @curdate = getdate()
select @cutoffdate = null
-- find max retention of all pubs the article belongs to.
-- add some safety margin to compensate for different clock speeds
select @cutoffdate = min(sys.fn_subtract_units_from_date(isnull(retention,0), retention_period_unit, @curdate))
from dbo.sysmergepublications where
pubid in (select pubid from dbo.sysmergearticles where nickname = 5088000)
select @cutoffdate
and this is the message error:
Msg 4121, Level 16, State 1, Line 7
Cannot find either column "sys" or the user-defined function or aggregate "sys.fn_subtract_units_from_date", or the name is ambiguous.
I looked this function but I didn't find it.
any help will be appreciated !
View 4 Replies
View Related
Oct 9, 2007
I am working on bringing our disaster recovery site to be a live site. Currently we replicate to one of out servers (server B) with merge replication (from server A). Server A also does one way transactional replication form some table to several other servers including servers at the DR site.
This setup is not going to be fast enough for what we need so I am wondering if a table is receiving merge replication will the merge updates also replicate down the transaction path??
Example...
Server B update a row and merges to Server A. With this update them replicate (via transactional) to Server C??
thanks...
View 5 Replies
View Related
Mar 16, 2014
I am trying to insert new records into the target table, if no records exist in the source table. I am passing user specific values for insert, but it does not insert any values, nor does it throw any errors. The insert needs to occur in the LOAN_GROUP_INFO table, i.e. the target table.
MERGE INTO LOAN_GROUP_INFO AS TARGET
USING (SELECT LGI_GROUPID FROM LOAN_GROUPING
WHERE LG_LOANID = 22720
AND LG_ISACTIVE = 1)
AS SOURCE
[Code] .....
View 8 Replies
View Related
Oct 7, 2015
In a t-sql 2012 merge statement that is listed below, the insert statement on the merge statement listed below is not working. The update statement works though.
Merge test.dbo.LockCombination AS LKC1
USING
(select LKC.lockID,LKC.seq,A.lockCombo1,A.schoolnumber
from
[Inputtb] A
JOIN test.dbo.School SCH ON A.schoolnumber = SCH.type
[Code] ....
Thus would you tell me what I need to do to make the insert statement work on the merge statement listed above?
View 6 Replies
View Related
Mar 28, 2006
Hello...
We have had Merge Replication working for the past few months (SQL 2005 to SQL Mobile) and suddenly today the replication URL that points to the SqlCESA30.DLL does not work. I have tried re-running the SQL Mobile virtual folder wizard a few times....resetting IIS and even a re-boot...and still the URL is not available.
Is there anything that might provide some clue as to why this has unexpectedly failed?
thanks for any help!
- will
View 3 Replies
View Related
Feb 14, 2002
Hi everbody,
I setup the Merge Replication , it is working perfectly. But i have one problem now it is updating both ways. I nedd one way. Any body tell me which parameter i have to change.
Thanks in advance
View 1 Replies
View Related
Aug 12, 2002
Hi,
My production box is running on NT4.0,SP6, SQL Server7.0,SP2. We implemented Merge replication. Working fine last 7 months. Last weekend i disabled replication, Successfully removed Distributor and Publishor. After that try add new fileds but won't allowed me. It's give the error message. I Also found Some Conflict_tables found almost 20 tables. All system Tables. Can delete these these tables, if i delete any problem my database.
I added filelds many times but this time i got errors.
Please help me anybody.
View 6 Replies
View Related
Jul 31, 2000
I have just installed replication on our production server to Merge Replicate with a Laptop server that will travel from time to time. I have now noticed that we cannot add or change any fields or attributes on the tables which are being replicated (which are all tables in the DB). This is a problem because we are changing and adding columns all of the time. Is there a way around this issue like shutting down the replication service or something? I have been unsuccessful in finding a way around this other than removing replication while we make changes.
Thank you in advance for any help!
View 1 Replies
View Related
Jan 22, 2001
I have implemented a Merger replication on our development server and I get a fillowing error when I try to update one of the table in publisher.
"Transaction cannot start while in firehose mode"
What does this mean.
Thank You,
John
View 1 Replies
View Related
Dec 19, 2000
Hi,
I read some where that replication has two types conflict resolution, 1. row based and 2. Column based...
If I am right...
Can any one point me how to find out this option and how to set it up....
Thanks,
Mohammed.
View 1 Replies
View Related
Sep 16, 1999
Hi all,
I have a merge replication going between 4 servers. The problem is when ever I do some BCP transfer to one of the tables in one of the servers. It puts the data in that table. But that Data does not get replicated to any other server like it should.
Please Advice on what to do. Is there any option I am forgetting to set or something.
Thank you for all your time in advance.
Aziz
View 3 Replies
View Related
Sep 12, 2003
I have successfully tried merge replication on single server with 2 databases.
now i want to do the same with different servers,
when i create pull subcription on server 2 which user account should I use?
it is giving log in failure
i tried using windows admin account and also the 'sa' account.
please help me out
thanks
View 1 Replies
View Related
Feb 23, 2004
Hi All,
I have posted this earlier and I am re-posting it simplifying what I had said.
The scenario is:
I have two sql server database instances with the same database schema and all. However, both of them have different data. I have not set them for replication at all. Now, I want to do merge replication between them such that the data between them could be syncronized.
When I do pull merge subscription I have two choices -
1.Bringing schema and data to subscriber from publisher
2.Not bringing the schema and data from publisher to subscriber.
Obviously, I chose the second choice. But upon syncronizing I dont see any data from publisher coming to subscriber and vice-versa. If I add new data to publisher and do syncronization, I can see ONLY the new data created after the replication setup in subscriber. If I add new data to subscriber and do syncronization then the new data is removed from subscriber and not propagated to publisher.
Is there any way I can make this work??
Niben
View 10 Replies
View Related
Jan 2, 2007
Hi,
I have just set up Merge replication, I have two servers, server A and server B, the merge replication worked successfully but I don't quite sure which databases should or should not replicated? If not, what other methods should I use?
I would really appreciated any comments or advice out there!
-whitebelt
View 14 Replies
View Related
Mar 21, 2002
I had set up merge replication. I got these error messages where replications starts "Column names in each table must be unique. Column name 'PubID' in table 'bonflict_DBName_PHP_Data_Publications' is specified more than once "
PHP_Data_Publications table defind as:
CREATE TABLE [dbo].[PHP_Data_Publications] (
[PHP_Pub_ID] [uniqueidentifier] NOT NULL ,
[PHP_Data_ID] [uniqueidentifier] NOT NULL ,
[PubID] [uniqueidentifier] NOT NULL ,
[UserID] [uniqueidentifier] NOT NULL ,
[Username] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Publication] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Pub_Year] [datetime] NULL ,
[Pub_Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[rowguid] uniqueidentifier ROWGUIDCOL NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PHP_Data_Publications] WITH NOCHECK ADD
CONSTRAINT [DF__PHP_Data___rowgu__01E91FA0] DEFAULT (newid()) FOR [rowguid]
GO
CREATE UNIQUE INDEX [index_1466488303] ON [dbo].[PHP_Data_Publications]([rowguid]) ON [PRIMARY]
GO
Thanks,
Chanthol
View 3 Replies
View Related
Oct 11, 2001
Hi
Is it possible to modify or add new fields in sql 2000 when the instance
became publisher ? I tried it several times but it failed. I access microsoft website but i did not help.
Thanks
Pheckz
View 3 Replies
View Related
Oct 12, 2001
Hi everbody,
Anybody tell me about implementation of oneway merge replication.
Thanks
View 2 Replies
View Related
Feb 5, 2001
Hi everyone
SQL Server BOL says merge replication can be done in only one direction. But my understanding is Merge replication happens in both ways between publisher and subscriber.
How can i allow data movement from only wince sql ce subscribers and not from publisher running sql 2000 and win 2k.
Please reply immediately bcoz i require a solution which has to be implemented very soon.
Thanks in advance
Satheesh
View 1 Replies
View Related
Jun 29, 2004
hi,
in merge replication,i make a request subscriber with a priority 25.00,when i update the same date,it always choose the update from the publishing server,why????how does it work???
thx inadvance
View 1 Replies
View Related
Oct 5, 2004
I am using merge replication at remote connected via ISDN Dialup line. I got following error and replication fail.
publisher - PRSTGINDSQLIND
agent - PRSTGINDSQLIND-pml-pml-192.168.100.50SQLDWS-4
publication - pml
subsctription - 192.168.100.50SQLDWS:pml
error - The process could not deliver the snapshot to the Subscriber.
Agent Merge replication provider -2147201001
Agent 192.168.100.50sqldws 20037
ODBC 192.168.100.50sqldws
Agent - PRSTGINDSQLIND-pmst-pmst-192.168.100.50SQLDWS-3
error - The subscription to publication 'pmst' is invalid.
last command {call sp_MSgetreplicainfo(?,?,?,?,?,?,?)}
Thanking You
R.Mall
View 2 Replies
View Related
Jan 4, 2005
I am in a process of learning Replication in MSDE, especially Merge Replication
Server runs on MS-XP Professional
--------------------------------------
I have a sample Access project 'ReplTest' which has only table with only 2 columns.
DatabaseName:ReplTestDB
Table Name :TestTable
MSDE Instance Name:SVRMYINSTANCE
Now I would like to know how I can configure this database for merge replication
using SQL-DMO
Laptop runs on MS-XP Professional
--------------------------------------
I have another access project which is running on computer 2 and connected to the
ReplicaTest database.
MSDE Instance Name:LPTMYINSTANCE
My task is, when I am disconnected from server I would like to have a local copy of
the database to work with and then, when reconnected, need synchronization with the
server database and continue working from server database.
How to write this replication process from scratch using SQL-DMO objects in both Server computer
and Laptop computer.
I dont have enterprise manager in both computers since they use only MSDE
Can anyone help me?
Thanks in advance
JP
View 7 Replies
View Related
Jan 18, 2006
Hi,
I have a problem when doing merge replication. I need to have a identity column on both the publisher and subscriber, eg id. When the publisher is down, my app will now reference to the subscriber and insert into the subscriber. However when the publisher is up, the app will reference to publisher and start to insert into the publisher. This will cause conflict in the id. Also, i need the id to be in running order, therefore i cant use range for publisher and subscriber. Anyone have idea how to solve this problem?
Aaron
:(
View 2 Replies
View Related
Mar 7, 2006
Hello,
I am having a problem getting my merge replication to work out. I am wanting to make it where the merge happens on demand. I have tried to run replmerg through cmd prompt and I get the error 'The subscription to publication [namehere] has expired or does not exist.' I have had no problems running the merge agent within Enterprise Manager. I have thought of running windows sync manager but I do not want my people to have to type a password in everytime they need to sync. I am running the whole replication process through FTP. I am in desperate need of help. Anything would be great!
Thanks
View 4 Replies
View Related
Sep 14, 2006
Is it possible to setup a server as both a Publisher and Subscriber of the same database in a Merge Replication setup?
View 2 Replies
View Related
Jan 3, 2004
Hi Everybody
I have a problem with Merge Replication with this error message'The subscription to publication 'GsAdmin' is invalid.'.
Pleaese help me because I don't know what to do.
Thankyou
View 1 Replies
View Related
Mar 30, 2004
Can you merge replicate data from SQL Server 7.0 to SQL Server 2000?
View 1 Replies
View Related
Apr 1, 2004
I have merge replication setup between 2 servers and the subscriber had been offline for about 24 hours due to a network outage. What would be the best and easiest way to resynch the data. Would my best bet be a reinitialization or should I start a new snapshop and reapply. Also can I start a snapshot while users are using the publishing database?
Thanks,
Mike
View 5 Replies
View Related
Apr 14, 2008
I've tried to configure merge replication between SQL2005 and SQL Express use Web synchronize but the status of subcription is always uninitialized although I reinitialized it.
Could you tell me the way to start it ?
Thank so much.
View 7 Replies
View Related