在雪花授权所有权文档中,有一个对"传出权限"的引用
什么是"传出权限"?
这是可选参数"复制/撤销当前授权"的一部分
它说:"转移一个对象的所有权以及该对象上任何现有出站权限的副本。">
我想弄清楚什么是"出站特权"。
编辑:这是我做的一个测试。我看不出有什么不同。
create or replace view sandbox.test_schema.my_test_view
as
select 1 a;
grant ownership on view sandbox.test_schema.my_test_view to role ABC
show grants on view sandbox.test_schema.my_test_view
特权=所有权;granted_to=角色;grantee_name=ABC;grant_option=true;granted_by=ABC
如果我添加拷贝授权
如果我运行的所有东西都完全一样,除了我复制授予权限
grant ownership on view sandbox.test_schema.my_test_view to role ABC copy current grants
在视图中显示拨款的结果是相同的。
有没有一个"复制当前拨款"会产生影响的例子?
"出站权限"是指对象上的现有权限(当前授予(。
所以你更新了你的样本,问是否有"复制当前拨款"的例子会有所不同?
假设还有另一个角色(DEF(,并且我们在示例视图中授予了选择权:
create role DEF;
grant select on sandbox.test_schema.my_test_view to role DEF;
在这种情况下,以下命令将失败,并表示"SQL执行错误:存在对角色"DEF"授予安全的"SANDBO.TEstrongCHEMA.MY_TEST_VIEW"特权"SELECT"的依赖性授予":
grant ownership on view sandbox.test_schema.my_test_view to role ABC;
为了克服这个问题:
1( 我们可以手动删除现有的授权,然后重试第一条语句:
revoke select on sandbox.test_schema.my_test_view from role DEF;
grant ownership on view sandbox.test_schema.my_test_view to role ABC;
2( 我们可以自动删除现有拨款:
grant ownership on view sandbox.test_schema.my_test_view to role ABC revoke current grants;
3( 我们可以在更改所有权的同时保留现有拨款:
grant ownership on view sandbox.test_schema.my_test_view to role ABC copy current grants;
因此,如果对象上有现有的授权,"COPY/REVOKE current grants"会产生影响。