Is subscription database considered as read-only?

  • I am not sure about that because while users implement SELECT from subscription database, publisher replicates data to the subscription server meaning that INSERT and UPDATE also take place(which are done with the distribution agent) in subscription database along with SELECT. The purpose of asking this question is that I am thinking about implementing indexed view on my subscription database. As we know, indexed view is a great choice for read-only database as we do not UPDATE/INSERT/DELETE rows from those tables.

  • Those tables are going to get inserted, updated and deleted as often as if they were in the publication database, so if it were me I'd use the same caution when deciding whether to use an index view as I would on the publisher.

    John

  • There are a few things that you will need to keep in mind if you add indexes to the subscriber database.

    Never change a primary key.  This goes for the structure, as well as the key values themselves.  The primary key is how the subscriber is going to identify where updates need to be applied.  A duplicate primary key error will cause the replication to stop.

    You may not be able to add a columnstore index to a subscribed table (found out the hard way on this one).

    ry1) Never change a Primary Key.Nev

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply