Security10:Grant object Permission to DB Role or User

1,将访问Object的权限授予Database Role 或 User 的语法如下

GRANT <permission> [ ,...n ]
ON [ OBJECT :: ][ schema_name ]. object_name [ ( column [ ,...n ] ) ]
TO [Database_user | Database_role] [ ,...n ]
[ WITH GRANT OPTION ] 

An object is a schema-level securable contained by the schema that is its parent in the permissions hierarchy. The most specific and limited permissions that can be granted on an object are listed in the following table, together with the more general permissions that include them by implication.

Object Permission 是使用该语句能够授予的Permission,而

Object permission Implied by object permission Implied by schema permission
ALTER CONTROL ALTER
CONTROL CONTROL CONTROL
DELETE CONTROL DELETE
EXECUTE CONTROL EXECUTE
INSERT CONTROL INSERT
RECEIVE CONTROL CONTROL
REFERENCES CONTROL REFERENCES
SELECT RECEIVE SELECT
TAKE OWNERSHIP CONTROL CONTROL
UPDATE CONTROL UPDATE
VIEW CHANGE TRACKING CONTROL VIEW CHANGE TRACKING
VIEW DEFINITION CONTROL VIEW DEFINITION

Examples

A. Grant SELECT permission to user RosaQdM on table Person.Address.

GRANT SELECT
ON OBJECT::Person.Address
TO RosaQdM; 

B. Grants EXECUTE permission on stored procedure HumanResources.uspUpdateEmployeeHireInfo to an database role called Recruiting11.

GRANT EXECUTE
ON OBJECT::HumanResources.uspUpdateEmployeeHireInfo
TO Recruiting11; 

C.Grant REFERENCES permission on column BusinessEntityID in view HumanResources.vEmployee to user Wanida with GRANT OPTION.

GRANT REFERENCES (BusinessEntityID)
ON OBJECT::HumanResources.vEmployee
TO Wanida WITH GRANT OPTION;

D.Grant EXECUTE permission on procedure uspGetBillOfMaterials to a database role

GRANT EXECUTE
ON dbo.uspGetBillOfMaterials
TO newrole ;  

参考doc:

GRANT Object Permissions (Transact-SQL)

时间: 2024-10-08 17:24:42

Security10:Grant object Permission to DB Role or User的相关文章

关于SVN出现 :can&#39;t open file &#39;db/txn-current-lock&#39;:Permission denied

今天在服务器上拷贝了一份SVN的资源库目录,看到正常访问以为不会有什么问题,可是在上传的时候出现了以下错误: can't open file '../db/txn-current-lock':Permission denied 怎么办呢?觉得像是目录权限的问题,查了一下资料,发现确实也是这个问题,执行以下命令就行了. chmod 777 -R /svn/test 关于SVN出现 :can't open file 'db/txn-current-lock':Permission denied

impdp 导入物化视图(mv)时报错 :ORA-31685: Object type MATERIALIZED_VIEW

本文为原创文章,转载请注明出处: http://blog.csdn.net/msdnchina/article/details/38782657 db 版本为10.2.0.4 impdp 命令为 impdp sys/as dumpfile=scott.dmp logfile=scott_imp_no_remap.log 导入的报错为: Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW ORA-31685: Object type MAT

解决Hibernate删除异常:deleted object would be re-saved by cascade

我们在指定了数据库表的关联映射后,在删除其中一方的的时候,提示了以下异常:deleted object would be re-saved by cascade (remove deleted object from associations): [entity.Associationinformation#7] (注:entity.Associationinformation是实体类,7为设定的外键的值) 下面是我的多对一关联情况: 1.实体类: entity.Associationinfor

(一)、BOM:Browser Object Model

BOM window 打开关闭窗口 窗口大小和窗口位置 ****定时器 (一).BOM:Browser Object Model 浏览器对象模型:用来访问和操作浏览器窗口,使JS有能力与浏览器交互. 专门操作浏览器窗口的API--没有标准,有兼容性问题 浏览器对象模型的主要对象 window:代表整个窗口是BOM的根对象 2个角色:1.代替global称为全局作用域对象  2.封装所有DOM API 和BOM API 以下为window的子对象 1.history:封装当前窗口打开后,成功访问过

Dynamices CRM Permission Issue (Security role UI to privilege mapping)&#39;s solution

select * from privilege where  privilegeid = 'a4736385-9763-4a64-a44b-cd5933edc631' Security role UI to privilege mapping Dynamics CRM 2013 Applies To: Microsoft Dynamics CRM 2013, Microsoft Dynamics CRM Online This topic provides a mapping of the se

MySQL权限操作:Grant、Revoke

数据库操作: 创建数据库.创建表--CREATE 删除数据库.删除表--DROP 删除表内容--TRUNCATE.DELETE(后者效率低.一行一行地删除记录) 查询数据库.查询表--SELECT 插入.更新.删除--INSERT INTO.UPDATE.DELETE(上面有提到) 修改表--ALTER(添加.修改或删除列) MySQL各种权限(27种):参考http://www.cnblogs.com/subsir/articles/2568361.html by 市集 usage selec

设计模式之美:Null Object(空对象)

索引 意图 结构 参与者 适用性 效果 相关模式 实现 实现方式(一):Null Object 的示例实现. 意图 通过对缺失对象的封装,以提供默认无任何行为的对象替代品. Encapsulate the absence of an object by providing a substitutable alternative that offers suitable default do nothing behavior. In short, a design where "nothing w

解决本地软件链接不上虚拟机mysql 的问题:grant all privileges on *.* to &#39;root&#39;@&#39;%&#39; identified by &#39;nsfocus&#39;

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION; //本地操作的权限 mysql> GRANT ALL PRIVILEGES ON *.* TO ' root '@'%' ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION; 首先要声明一下:一般情况下,修改MySQL

JS--bom对象:borswer object model浏览器对象模型

bom对象:borswer object model浏览器对象模型 navigator获取客户机的信息(浏览器的信息) navigator.appName;获得浏览器的名称 window:窗口对象 alert();弹出框 confirm(msg);确认框 prompt(提示信息,defaultText):输入框 open("打开的新窗口的地址URL"," ","窗口特征,比如窗口的宽度和高度"); window.open("hello.