Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Replication (2005)
 Merge replication

Author  Topic 

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2008-06-26 : 14:33:30
I have set up merge replication in my local sql server.Distributor,publisher and subscriber are on one server.I have imported some data into publisher database by using SSIS, I was expecting to see this new data in my subscriber database, but it never happened, replication jobs are working fine, so when I reinitialized the subscriber then I see new data in the subscriber, why it is like this, only after reinitializing the subscriber I am seeing the new data in subscriber, whereas when I insert data into publisher using a insert script in q analyzer I see data is getting updated in subscriber. Please advise if I am missing anything in the merge replication set up.

Summary: Data is getting synchrinized in publisher and subscriber when i insert data with script in Q analyzer.
whereas when I import data using SSIS , data is getting synchronized only after reinitializing the subscriber.
Can anyone let me know if I missed anything while setting up merge replication.

Thanks

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-26 : 16:07:22
Do you get any error? Did you check Merge agent whether its working fine?
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2008-06-26 : 16:46:17
quote:
Originally posted by sodeep

Do you get any error? Did you check Merge agent whether its working fine?



I did not get any error, all agents are working fine.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-26 : 16:48:33
Probably because SSIS used a bulk insert and replication copies INSERT/UPDATE/DELETE statements.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-26 : 16:53:27
It should work for Bulk-insert too. But It only gets replicated once transaction is completed.
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2008-06-26 : 16:54:20
quote:
Originally posted by tkizer

Probably because SSIS used a bulk insert and replication copies INSERT/UPDATE/DELETE statements.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog


Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-26 : 16:55:45
Why did you copy what she said? Any answers for those?
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2008-06-26 : 16:59:07
quote:
Originally posted by sodeep

Why did you copy what she said? Any answers for those?



yeah , by mistake I hit enter.
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2008-06-26 : 17:01:33
quote:
Originally posted by sodeep

It should work for Bulk-insert too. But It only gets replicated once transaction is completed.



Then it's a good news, so why it did not worked in my case.
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2008-06-26 : 17:24:41
quote:
Originally posted by tkizer

Probably because SSIS used a bulk insert and replication copies INSERT/UPDATE/DELETE statements.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog




I think it's true ,I even tried importing data with SSMS import export wizard still data is not getting synchronized, if this is the case then is there any work around for this, since I am going to set up merge replication where publisher is going to get data from different servers like oracle,access and we are using DTS packages to import data. I may have to come to conclusion that we cannot use replication. Please let me know any suggestions.
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2008-06-27 : 10:13:22
I found solution for this, I have put the below script in a job and scheduled it to run every 1/2 an hour.This is working fine and data is getting synchronised when ever I load data into publisher by using SSIS.

EXEC sp_reinitmergepullsubscription
@publisher = ITServer,
@publisher_db = publisher,
@publication = ITServer_Publication_PublisherDB,
@upload_first = N'True';
GO
Go to Top of Page
   

- Advertisement -