Databases Reference
In-Depth Information
At this point, a schema has been created; it's owned by DBO. You now need to change the ownership of the
UserProperties table to MyReadOnlySchema:
ALTER SCHEMA MyReadOnlySchema TRANSFER DBO.UserProperties
The table now belongs to the schema, as shown in Figure
3-7
.
Figure 3-7.
Viewing the new schema owner
However, you aren't done just yet. MyTestLoginUser can no longer see the table. Issuing a
select
statement on
the table returns an
Invalid object name
message, as shown in Figure
3-8
.
Figure 3-8.
Error when the user can't see an object