Using Schemas in SQL2005 - Use, best practice?

  • SQL 2005 provides for schemas to be setup and managed as entities separate from users. This allows one to group database objects by function into different schemas within a database; say performance related objects in a perform schema and administration in an admin schema. Possible benefits:

    - clearer object names

    - easier database administration

    - security

    Are schemas being used this way at all? Is there any best practice? What are the potential pitfalls?

    Peter

  • They're certainly the goals.  The clearer object names (like namespaces I suppose) are the most obvious benefit.  I haven't explored them a lot yet but have read some articles.  One I was reading the other day - whilst not directly related to schemas - http://www.sommarskog.se/grantperm.html#ownerschema, had some info on how schemas are different from the old user+schema in SQL 2000 and earlier.  The article talks about security quite a bit - schemas play a small role there from memory (you can assign permissions for users/roles to schemas, etc)

Viewing 2 posts - 1 through 1 (of 1 total)

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