Fliter MS objects out of select statement

  • 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

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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