I want to get a list of user tables that excludes dtproperties and
sysdiagrams. In Management Studio these two tables show up in their own
Tables > System Tables folder.
However, both sys.tables and INFORMATION_SCHEMA.TABLES include dtproperties
and sysdiagrams as user tables, and there are no columns in either of these
views to differentiate these tables from true user tables.
Is there any way to exclude these two annoying tables using selection
criteria in any of the standard metadata views? How does Management Studio
do it?Oops, just saw sys.tables.is_ms_shipped = 1 for these guys. Never mind...
"Dana" wrote:
> I want to get a list of user tables that excludes dtproperties and
> sysdiagrams. In Management Studio these two tables show up in their own
> Tables > System Tables folder.
> However, both sys.tables and INFORMATION_SCHEMA.TABLES include dtproperties
> and sysdiagrams as user tables, and there are no columns in either of these
> views to differentiate these tables from true user tables.
> Is there any way to exclude these two annoying tables using selection
> criteria in any of the standard metadata views? How does Management Studio
> do it?|||Dana,
If you don't use SQL Server to maintain ER diagrams I believe you can delete
both tables without consequence. Otherwise, excluding them in the predicate
is the only way I know of.
-- Bill
"Dana" <Dana@.discussions.microsoft.com> wrote in message
news:B7ACAF22-6FAE-4364-B4C3-5673CCFC9AE0@.microsoft.com...
>I want to get a list of user tables that excludes dtproperties and
> sysdiagrams. In Management Studio these two tables show up in their own
> Tables > System Tables folder.
> However, both sys.tables and INFORMATION_SCHEMA.TABLES include
> dtproperties
> and sysdiagrams as user tables, and there are no columns in either of
> these
> views to differentiate these tables from true user tables.
> Is there any way to exclude these two annoying tables using selection
> criteria in any of the standard metadata views? How does Management
> Studio
> do it?|||Good to know, Dana.
"Dana" <Dana@.discussions.microsoft.com> wrote in message
news:8162BD94-2F40-4D31-BCE9-0D3BB27AD3E1@.microsoft.com...
> Oops, just saw sys.tables.is_ms_shipped = 1 for these guys. Never
> mind...
> "Dana" wrote:
>> I want to get a list of user tables that excludes dtproperties and
>> sysdiagrams. In Management Studio these two tables show up in their own
>> Tables > System Tables folder.
>> However, both sys.tables and INFORMATION_SCHEMA.TABLES include
>> dtproperties
>> and sysdiagrams as user tables, and there are no columns in either of
>> these
>> views to differentiate these tables from true user tables.
>> Is there any way to exclude these two annoying tables using selection
>> criteria in any of the standard metadata views? How does Management
>> Studio
>> do it?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment