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 2008 Forums
 Replication (2008)
 Can I write to a replicated database?

Author  Topic 

JohnBGood
Starting Member

48 Posts

Posted - 2011-04-28 : 06:15:46
I want to be able to write to a database that is a subscriber to a publisher database. For example, lets say I have a table "myTable" in my subscriber database and I want to insert a new row. This new row however does not exist in the publisher database.

Is this scenario supported?

yadhu_cse
Constraint Violating Yak Guru

252 Posts

Posted - 2011-04-28 : 07:50:40
u have to use transaction replication with updatable and start distributable transaction coordinator service. but u need to have sql standerd and later vesion in both system that is subsciber and publisher
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-04-28 : 12:10:46
That's only correct if you want the record written at the subscriber to also appear at the publisher.

If you just want to write a record to the subscriber, and not at the publisher, nothing will prevent you from doing so, but it is a VERY POOR practice and is highly likely to cause errors down the road.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-04-28 : 13:24:40
quote:
Originally posted by yadhu_cse

u have to use transaction replication with updatable and start distributable transaction coordinator service. but u need to have sql standerd and later vesion in both system that is subsciber and publisher



What?

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

Subscribe to my blog
Go to Top of Page

JohnBGood
Starting Member

48 Posts

Posted - 2011-05-02 : 07:28:57
Why is updating a subscriber a poor practice? What are the dangers?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-05-02 : 11:56:12
It's a poor practice because it's supposed to be treated as read-only, the replicated tables at least. Modify the data at the publisher instead, and it'll get replicated to the subscriber. If you don't want the data at the publisher and only want it at the subscriber, well then add it to the subscriber. But be warned that you could break replication by modifying data at the subscriber, hence the reason why you shouldn't do this.

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

Subscribe to my blog
Go to Top of Page
   

- Advertisement -