Thursday, February 16, 2012

best way to preserve all dependencies

I know ive asked this before and created seperate publications for tables
and views,etc in order to avoid conflicts such as view being created before
the table,etc..
What do u guys prefer as the best method to handle this, especially if
reinitialize a publication that has tables in it and it results in error as
the table properties has a drop to it and hence would not be able to drop as
a view is present..
There must be better ways to handle all of this . If only I could create one
publication for all objects belonging to one database ..if only all of the
dependencies were ordered.
Hassan,
like you, I have separate publications - one for tables, one for views and
one for UDFs.
AFAIK, dropping a table should be fine unless the view has been created
using schemabinding.
For those cases where dependency info of views is incorrect, sp_refreshview
is sometimes useful; sometimes use sp_addscriptexec; sometimes just add the
view manually on the subscriber when there is connectivity and there is only
one subscriber.
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

No comments:

Post a Comment