Home All Groups Group Topic Archive Search About

Changing the Table Type

Author
20 Jan 2006 7:45 PM
CSHARPITPRO
Is there a to change the  Type property on a table?  I would like to be able
to change the Type from 'User' to 'System' through code.

Adv-thanks-ance

Author
20 Jan 2006 8:57 PM
Kalen Delaney
What do you need this for?
True system tables have object id values less than 100, and there is no way
you can create a table with such an id.

If you are only talking about what shows up in the 'type' column when you
list the objects in Enterprise Manager, you can run the procedure

exec sp_MS_marksystemobject 'mytable'

However, it would not actually be a system table, even though Enterprise
Manager lists it as such. For example, it would still show 'user table' when
using sp_help, and you would not need to set any special flags to

--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com


Show quote
"CSHARPITPRO" <CSHARPIT***@discussions.microsoft.com> wrote in message
news:A946CD68-5A88-4E55-B813-4D1ADBF49DA6@microsoft.com...
> Is there a to change the  Type property on a table?  I would like to be
> able
> to change the Type from 'User' to 'System' through code.
>
> Adv-thanks-ance
>

AddThis Social Bookmark Button