all groups > sql server replication > july 2004 >
You're in the

sql server replication

group:

Indexes: changing/adding with Publication enabled



Indexes: changing/adding with Publication enabled Robert A. DiFrancesco
7/27/2004 11:03:06 AM
sql server replication: Are there any stored procedures available to alter indexes while Publication
is enabled?

What is sp_addscriptexec used for?


thank you,
bob

Re: Indexes: changing/adding with Publication enabled Robert A. DiFrancesco
7/27/2004 1:24:34 PM
If I wanted to take the "long" way without utilizing sp_addscriptexec, would
this approach be valid:
- exec TSQL script on the publisher
- remote connect to subscribers and execute TSQL script

(2) I would not have to delete subscriptions or publications or disable
publishing in the above scenario?

Thanks Paul.



[quoted text, click to view]

Re: Indexes: changing/adding with Publication enabled Paul Ibison
7/27/2004 7:45:04 PM
Dropping and creating indexes on the publisher is permited but not
replicated. To propagate this to the subscriber, creating a TSQL script and
running sp_addscriptexec is the way to go. The same thing could be achieved
by using linked servers if they were all online but using sp_addscriptexec
is easier and will make sure the script is applied to all subscribers when
they synchronize.
hth,
Paul Ibison

Re: Indexes: changing/adding with Publication enabled Paul Ibison
7/27/2004 10:36:24 PM
Robert,
yes - this works OK. Adding an index isn't treated as a table change in the
same way as adding a column, and is permitted on the publisher and
subscriber without affecting the replication setup.
Regards,
Paul Ibison

AddThis Social Bookmark Button