开发者

Sub-Schemas in SQL Server 2005/2008

This is a simple question yet I was unable to fin开发者_如何学JAVAd any information at all about this.

Is it possible to have sub-schemas in SQL Server 2005/2008?

Example: Having a HR (Human Resources) schema with a sub-schema called Training (with tables related to this). It would end up like HR.Training.* where * would be the tables.


No. You could fake this with roles by putting different users into different roles and allowing those roles to use objects.


Maybe you could fake it in the naming of the schema, like HR_Training.* and HR_Reviews.* and so forth. Cheesy, I know.


Are you coming from an Oracle background by any chance ? Oracle has the concept of Schemas I believe. In SQL Server the closest equivalent is a Database.

You can cross-query from one database to another on the same SQL server very easily and that would give you virtually the same kind of calling syntax

e.g server.database.owner.object

In you case it might look like HRSvr.HR.dbo.xxx and HRSvr.Training.dbo.xxxx.


yea you can make schemas but doesn't seem like you can make sub-schemas. I come from IBM db2 background but our IT folks here don't seen to know that you can other schemas beside the default 'dbo'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜