运行如下代码,sql*plus说我权限不足,我需要什么权限?
CREATE MATERIALIZED VIEW SA.tjtc09
TABLESPACE DS_SA01
NOLOGGING
NOCACHE
NOPARALLEL
REFRESH COMPLETE
ON DEMAND
WITH ROWID
USING DEFAULT LOCAL ROLLBACK SEGMENT
DISABLE QUERY REWRITE AS
SELECT a.mat_no_custom,a.cold_mat_no,a.sg_no,a.order_surface_accuracy_code,a.mat_act_thick,
a.mat_act_width,a.mat_net_wt,DECODE(SUBSTR(b.order_type_code,1,1),'Q',1,0) AS flag_q,
a.order_no,a.event_time_query
FROM sa.tjtc08 a,od.so_dtsoa2 b
WHERE a.surface_grade_code<>'2' AND SUBSTR(a.order_no,1,9)=b.contract_num||b.order_seq_num;第一次执行说 表或视图不存在 错误指向from中的od.so_dtsoa2,于是我执行了如下:
grant select on od.so_dtsoa2 to sa;
再次执行以上代码,又提示说:
FROM sa.tjtc08 a,od.so_dtsoa2 b
*
ERROR 位于第 14 行:
ORA-01031: 权限不足---------------------------------------
请问怎么办??
CREATE MATERIALIZED VIEW SA.tjtc09
TABLESPACE DS_SA01
NOLOGGING
NOCACHE
NOPARALLEL
REFRESH COMPLETE
ON DEMAND
WITH ROWID
USING DEFAULT LOCAL ROLLBACK SEGMENT
DISABLE QUERY REWRITE AS
SELECT a.mat_no_custom,a.cold_mat_no,a.sg_no,a.order_surface_accuracy_code,a.mat_act_thick,
a.mat_act_width,a.mat_net_wt,DECODE(SUBSTR(b.order_type_code,1,1),'Q',1,0) AS flag_q,
a.order_no,a.event_time_query
FROM sa.tjtc08 a,od.so_dtsoa2 b
WHERE a.surface_grade_code<>'2' AND SUBSTR(a.order_no,1,9)=b.contract_num||b.order_seq_num;第一次执行说 表或视图不存在 错误指向from中的od.so_dtsoa2,于是我执行了如下:
grant select on od.so_dtsoa2 to sa;
再次执行以上代码,又提示说:
FROM sa.tjtc08 a,od.so_dtsoa2 b
*
ERROR 位于第 14 行:
ORA-01031: 权限不足---------------------------------------
请问怎么办??
对了
FROM sa.tjtc08 a,od.so_dtsoa2 b
*
ERROR 位于第 14 行:
ORA-01031: 权限不足sa.tjtc08 也是一个物化视图。已经建好了的。
grant select on tjtc08 to user
grant global query rewrite to user