要實現讓 A Owner 可以使用 B Owner 的 Object (如: Table, View, Stored Procedure, ...)
可以參考如下 :
B Owner 的 Table 只給 A Owner Select 使用
建立: Grant Select on B.TableName to A; 刪除: Revoke Select on B.TableName From A;
B Owner 的 Table 只給 A Owner Select & Insert & Update & Delete 使用
建立: Grant Select, Insert, Update, Delete on B.TableName to A; 刪除: Revoke Select, Insert, Update, Delete on B.TableName From A;
B Owner 的 Table 給 A Owner All 權限 使用
建立: Grant All on B.TableName to A; 刪除: Revoke All on B.TableName From A;
B Owner 的 Table 給 All Owner All 權限 使用
建立: Grant All on B.TableName to public; 刪除: Revoke All on B.TableName From public;
B Owner 的 Procedure / Package 只給 A Owner 使用
建立: Grant [ Execute / All ] on B.ProcedureName_Or_PackageName to A; 刪除: Revoke [ Execute / All ] on B.ProcedureName_Or_PackageName From A;
B Owner 的 Procedure / Package 給 All Owner 使用
建立: Grant [ Execute / All ] on B.ProcedureName_Or_PackageName to public; 刪除: Revoke [ Execute / All ] on B.ProcedureName_Or_PackageName From public;
以上, 參考看看囉.