sql-serverreplication

Can you insert into a replicated SQL Server DB?


I need to store some data in a SQL DB for DataWarehousing purposes.

We will be using a replicated SQL Server Database.

Is it possible to insert into only the replicated DB (and not the main DB) so that we do not effect the main DB and still allow reporting and extraction of data out of the replicated DB?


Solution

  • Yes, but I would advise against it. Specifically, I tend to treat replication subscribers as expendable. Which is to say that I make the choice to not back them up. What you're suggesting means that there is data in the system that exists only at the subscriber which implies that the subscriber should be backed up. You're now re-backing up data that has been backed up at the publisher.

    Also, I'd completely advise against putting that data in the same table as is being subscribed. On an article re-initialization, there's too much risk of it being deleted.