Schema in Table Property

  • Hi,

    Right click on a table and select properties, there's a schema property in the general tab; what does that mean and how it can be set to different schemes in one DB.

    Thanks,

  • In "old" SQL Server 2000, "schema" was actually called "owner". It's the login or role that owns the object. It's assigned when the object is created and defaults to who ever or what ever role you're logged in as at the time of creation. It should normally be explicitly stated in the creation code.

    Ownership can be changed post creation using the sp_changeobjectowner system stored procedure. Of course, anything that refers to the changed object (procs, udfs, etc) will also need to be changed. It also removes ALL permissions from the object which, obviously, will need to be reassigned.

    Lookup sp_changeobjectowner in Books Online for more information.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thank you 🙂

    Does it have the same meaning in SQL2005?

  • Yes.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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