向 Oracle 中的检查器工作空间组件授予权限
地理数据库管理员必须向将要访问检查器工作空间的所有地理数据库用户授予以下表的特定权限。这可以通过创建数据库角色并向各个用户分配角色来实现。
注:
对示例进行复制和粘贴可能会导致语法错误。
授予权限
在 Oracle SQL Plus 或 Oracle SQL Developer 中,可通过方案向检查器工作空间表授予权限。示例脚本显示如何删除角色,然后重新创建角色并分配权限。
SET SERVEROUTPUT ON;
spool Roles_rev.sql;
DROP ROLE "RLREVEDITOR";
CREATE ROLE "RLREVEDITOR" NOT IDENTIFIED;
DROP ROLE "RLREVVIEWER";
CREATE ROLE "RLREVVIEWER" NOT IDENTIFIED;
select 'grant select on ' ||owner|| '.' || table_name || ' to RLREVVIEWER;'
from sys.dba_tables where lower(owner) = 'rev' order by table_name;
select 'grant select,insert,update,delete on ' ||owner|| '.' || table_name || ' to RLREVEDITOR;'
from sys.dba_tables where lower(owner) = 'rev' order by table_name;
spool off;
SET SERVEROUTPUT ON;
/
@Roles_rev.sql;
/
提示:
如果用户具有修改数据库方案以及添加自定义错误描述的权限,则仅授予用户对 RevAdminCustomFields 和 RevAdminDescriptions 表的选择、更新、插入和删除权限。
创建编辑器用户
用户应该有他们自己的登录帐户名。下面的示例显示了如何创建编辑器 ArcSDE 用户并向 ArcSDE 编辑器用户授予 RLREVEDITOR 角色。
创建编辑器用户。
CREATE USER REV_EDITOR PROFILE "DEFAULT"
IDENTIFIED BY editor
DEFAULT TABLESPACE "USERS"
TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
GRANT "CONNECT" TO "REV_EDITOR";
GRANT CREATE TABLE TO "REV_EDITOR";
GRANT "RLREVEDITOR" TO "REV_EDITOR";
/*-- RLREVEDITOR role has SELECT, INSERT, UPDATE and DELETE permission on the REV data (featureclasses, tables, etc.)
ALTER USER REV_EDITOR QUOTA UNLIMITED ON "SDELOGFILE";
ALTER USER REV_EDITOR QUOTA UNLIMITED ON "SDELOGFILEIDX";
创建查看器用户
用户应该有他们自己的登录帐户名。下面的示例显示了如何创建查看器 ArcSDE 用户并向 ArcSDE 查看器用户授予 RLREVVIEWER 角色。
创建查看器用户。
CREATE USER REV_VIEWER PROFILE "DEFAULT"
IDENTIFIED BY viewer
DEFAULT TABLESPACE "USERS"
TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
GRANT "CONNECT" TO "REV_VIEWER";
GRANT CREATE TABLE TO "REV_VIEWER";
GRANT "RLREVVIEWER" TO "REV_VIEWER";
/*-- RLREVVIEWER role has SELECT permission on the REV data (featureclasses, tables, etc.)
ALTER USER REV_VIEWER QUOTA UNLIMITED ON "SDELOGFILE";
ALTER USER REV_VIEWER QUOTA UNLIMITED ON "SDELOGFILEIDX";
9/9/2014