ITPub博客

首页 > Linux操作系统 > Linux操作系统 > sys用户下不允许创建物化视图

sys用户下不允许创建物化视图

原创 Linux操作系统 作者:liu_qingwei2008 时间:2011-05-23 18:57:08 0 删除 编辑
SQL> conn /as sysdba
Connected.
SQL>
SQL>
SQL> create table t(x int);
Table created.
SQL> insert into t values (1);
1 row created.
SQL> insert into t values (2);
1 row created.
SQL> /
1 row created.
SQL> commit;
Commit complete.
SQL> select * from t;
         X
----------
         1
         2
         2
3 rows selected.
SQL> select * from t group by x;
         X
----------
         1
         2
2 rows selected.

SQL> CREATE MATERIALIZED VIEW LOG ON t WITH SEQUENCE, ROWID
(x) INCLUDING NEW VALUES;
  2
Materialized view log created.
SQL> CREATE MATERIALIZED VIEW t_mv
BUILD IMMEDIATE
REFRESH fast on commit
ENABLE QUERY REWRITE AS
SELECT * from t GROUP BY x;
  2    3    4    5  SELECT * from t GROUP BY x
              *
ERROR at line 5:
ORA-30354: Query rewrite not allowed on SYS relations
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23898243/viewspace-696094/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-05-12

  • 博文量
    37
  • 访问量
    86583