|
|
Question : SQL replication and indexing
|
|
I have transactional replication set up between a SQL 2000 (Publicsher) and SQL 2005 (Subscriber). If I index the replica on the SQL 2005 server will it be overwritten by the next replication from the SQL 2000 server.
|
Answer : SQL replication and indexing
|
|
I don't think indexes are replicated everytime. One idea would be to have a job running at the subscriber that checks to see if indexes exists, and if not, creates them. For example:
if not exists(select * from sys.indexes where name = 'indexname' and object_name(object_id) = 'tablename') create index indexname on tablename(fieldlist)
Just have one statement for every index that you need. Should be set.
|
|
|
|