Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2005 Replication and different indexes on the subscriber

We have SQL Server database setup. We are setting up a replication scenarios where we have one publisher and on subscriber. The subscriber will be used as a reporting platform so that we can run all the BI queries that we need and have to hit the server that is reciving all the data from our clients. The subscriber is set to pull data in from the distributer.

We don't have many indexes on the publisher db, but we will need them on the reporting server (i.e subscriber).

My Question is: Will SQL Server a) allow this scenario, noting that no changes on the subscriber are pushed back the the publisher. b) if a snapshot is run I am presuming it will overwrite our indexes, can I stop this from happening? c) is this a wise course of action.

Thanks.

Paul Kinlan,

http://www.topicala.com/ http://www.thecompanything.com/

like image 360
Kinlan Avatar asked Nov 14 '08 16:11

Kinlan


People also ask

Are indexes replicated SQL Server?

Indexes are key to the performance of SQL Server, but only clustered key indexes are replicated by default. Unique constraints are replicated by default, so their indexes will also be created on subscribers, but nonclustered indexes are not replicated by default.

What are the different types of replication available in SQL Server?

There are four MS SQL Server replication types: snapshot replication, transactional replication, peer-to-peer replication and merge replication.

What is the difference between transactional replication and merge replication?

Merge Replication is the same as SQL Server Transactional replication; however, Merge replication replicates data from the Publisher to Subscriber and vice-a-versa.

What is replication subscriber?

A Subscriber is a database instance that receives replicated data. A Subscriber can receive data from multiple Publishers and publications. Depending on the type of replication chosen, the Subscriber can also pass data changes back to the Publisher or republish the data to other Subscribers.


1 Answers

The scenario you explain is a common one and one of the benefits of using replication. No changes or indexes you create on the subscriber will go to the publisher as it is a one way process. If you have to re-run the snapshot agent for some reason and re-initialize the subscriber than you will need to re-create your indexes on the subscriber. There are alot of things you can do to minimize the need to re-initialize the subscriber but some of them require some manual steps. Generally if you keep all of your index creation scripts for the subscriber up to date it usually isn't a big deal to re-run them if needed.

like image 92
John Lemp Avatar answered Nov 25 '22 14:11

John Lemp