阻止用户在通过 MS Word 中的邮件合并连接到数据库时能够查看特定模式下的表

Stop a user from being able to see tables under a certain schema while connecting to the database through mail merge in MS Word

我正在使用 MS Word 中的邮件合并连接到数据库以访问一组表。一半的表格在 schema_1 下,一半在 schema_2 下。

目前,一旦我连接到数据库,我就可以看到列出的所有表,而我只想看到 schema_1 下的表。 schema_2.

没有任何内容

我正在使用 sql server management studio 2005,并且设置了一个用户,我必须输入其详细信息才能从 MS Word 访问数据库。

许多 dbas 认为基于模式的安全性是管理 SQL 服务器安全性的最佳方法。您可以通过以下语句分配权限:

Grant read On  Schema::[schemaz] To [userx]

 revoke read on Schema::[schemab] To [userx]

您可能会觉得这篇文章很有趣:

https://www.simple-talk.com/sql/sql-training/schema-based-access-control-for-sql-server-databases/