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