1
create table #CascadeCollect(id INT IDENTITY(1,1) PRIMARY KEY CLUSTERED, objectid UNIQUEIDENTIFIER NOT NULL, objecttype INT NOT NULL)
2
exec dbo.p_CascadeCollect 'CascadeShare',10000,'C959C126-ED6D-E611-98E7-000C29835A34',0,'883D4CDC-F3D3-E511-8B46-000C29835A34'
-- @operation_type 'CascadeShare' 共享
-- @root_entity_otc 10000 entityobjectcode
--@root_entity_id 记录ID
--@is_offline 0
--@old_owner 记录 ownerid
3
exec p_CascadeGrantAccess '5F864A79-C96D-E611-A2B0-000C29835A34',8,10000,'C959C126-ED6D-E611-98E7-000C29835A34',1,134217729
-- @principal_id UNIQUEIDENTIFIER, 这里是被分享用户或者团队的 ID
--@principal_type INT, 用户为 8 团队为 9
--@root_entity_otc int, entityobjectcode
--@root_entity_oid UNIQUEIDENTIFIER, 记录ID
--@access_rights INT,
/*
WHEN 32 THEN 'Create' /* or hex value 0x20*/
WHEN 1 THEN 'Read'
WHEN 2 THEN 'Write'
WHEN 65536 THEN 'Delete' /* or hex value 0x10000*/
WHEN 4 THEN 'Append'
WHEN 16 THEN 'AppendTo'
WHEN 524288 THEN 'Assign' /* or hex value 0x80000*/
WHEN 262144 THEN 'Share' /* or hex value 0x40000*/
*/
--@inherited_access_rights INT
4
drop table #CascadeCollect