|
Posted by Erland Sommarskog on 03/14/06 00:07
(newtophp2000@yahoo.com) writes:
> My thanks to all who replied. So, if I understand it correctly, while
> the syntax remains the same, the dbo part will really refer to a schema
> within the database? (i.e., each user will have their own separate
> area where they can create tables.)
Yes and no, and maybe mainly no.
Schema is not really anything new in SQL Server. There has always been
schemas, and up to SQL 2000 any user had his own schema, and there was
no way to drop the schema for a user. Whether he actually could create
tables in tables in that schema depended on whether he had permissions
to create tables. The same was also true for roles - a role always came with
a schema.
The reason you did not always think of this as a schema, was because
the terminology talked about owner, and indeed, schema and ownership
were indeed the same thing.
In SQL 2005 schema and ownership are not tied to each other. This means
that you can create users without creating schemas for them, and the only
schema in the database used by an application will in many cases be DBO.
For more details on owner/schema separation, see
http://www.sommarskog.se/grantperm.html#ownerschema. (This is part
of a longer article.)
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|