Objects belong to Owners and Types - what are Types?

  • Hi,

    I have a procedure that creates a table to which I save SQL commands.

    This table gets generated for User dbo and type System, but all other tables belong to user dbo and type user.

    This means that the new table is not scripted when I generate a DB Create script.

    How is this type maintained and why am I saving the table there?

     

    Thanks

    Riccardo

  • I'm a little confused on what you are doing, but table types are:

    Type = System are system related tables, such as sysobjects, sysfiles and so forth.  They are internal system tables created by sqlserver.

    Type = User are user created tables.  They are tables created by users of sql server and not the System (sql it self).  When you create a table the type will be user, because you are a user.

  • Hi Brian,

    thanks for the reply... I will try and explain...

    I am trying to generate a script of an existing DB with SQL Server Management Studio, by doing right click, tasks, generate scripts option...

    This option works fine and gives me all objects for user dbo and type user...

    but it does not generate for objects for type system, and I have a couple of views that need to be generated.

    These views are not system objects but my views that I created from a sql query window... What I want to know is why they are of type system?

    Hope this is makes sense.

    regards

    Riccardo

  • Hi all, have found the answer....

    exec sp_MS_upd_sysobj_category 2
     
    this resolves the issue...???...
    cannot figure out how it could have happened, but little documentation there is on this... says that a patch might have called it!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply