Discussion:
Best way to determine if a replcated table is being used at all
(too old to reply)
jack benny
2010-11-19 16:45:25 UTC
Permalink
I'm trying to determine if all (any) of the tables in a particular
database tha we are mostly replicating are actually being used. We'd
like to drop the replication if they're not. Someone told me
sp_depends might be helpful but that it isn't completely so.
Ben Thul
2010-11-19 18:02:33 UTC
Permalink
This question is orthogonal to replication. It breaks down to "how so
I best determine if a table is being used?". I'm guessing that it
just so happens that the table(s) in question are at a database that
is a subscriber in a replication topology.

So even though it's not a replication question per se, here's how I'd
do it: drop the article in your test environment, drop the table at
the subscriber, and see what breaks. If you don't have that luxury,
you could always troll for the name of the table in sys.sql_modules
(though that's dicey because it may split the table name over multiple
rows) or use a combination of sp_refreshsqlmodule and
sys.sql_dependencies. Of course, that doesn't take into account and
ad hoc queries against the table.

HTH,
Ben
Post by jack benny
I'm trying to determine if all (any) of the tables in a particular
database tha we are mostly replicating are actually being used. We'd
like to drop the replication if they're not.  Someone told me
sp_depends might be helpful but that it isn't completely so.
Loading...