July 27, 2015 at 9:27 am
I am writing a script to get all of the user objects out of a database.
What I am having a hard time doing is filtering out the MS replication system objects, such as:
dbo.MSsnapshotdeliveryprogress
dbo.MSreplication_objects
dbo.MSreplication_subscriptions
dbo.MSsavedforeignkeycolumns
dbo.MSsavedforeignkeyextendedproperties
dbo.MSsavedforeignkeys
dbo.MSsnapshotdeliveryprogress
dbo.MSsubscription_agents
and so forth.
I am sure its a dumb question, but is there an easy way to filter them out?
Thanks,
Michael
July 27, 2015 at 9:38 am
does filtering on the is_ms_shipped column work for you? it sems to remove things like MSreplication_options and spt_values and stuff for me.
select *
from sys.objects
where is_ms_shipped = 0
Lowell
July 27, 2015 at 11:12 am
That worked. Thanks!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply