我用命令
create table ENTREQ
创键了一个表,
然后赋予权限给system用户。
grant all on uems_user to system;
system用户用SQL PLUS登陆后,
SQL> select * from ENTREQ
2 ;
select * from ENTREQ
*
ERROR at line 1:
ORA-00942: table or view does not exist怎么会提示这个表不存在呢?
create table ENTREQ
创键了一个表,
然后赋予权限给system用户。
grant all on uems_user to system;
system用户用SQL PLUS登陆后,
SQL> select * from ENTREQ
2 ;
select * from ENTREQ
*
ERROR at line 1:
ORA-00942: table or view does not exist怎么会提示这个表不存在呢?
USER is "SCOTT"
SQL> create user t1 identified by t1;User created.
SQL> create table t1(id number);Table created.SQL> insert into t1 values(1);1 row created.
SQL> select * from t1; ID
----------
1SQL> grant select on t1 to t1; --把表t1的查询权限授予用户t1
Grant succeeded.
SQL> conn / as sysdba --以SYS身份登录进行授权 这样用户t1才能进行数据库会话连接
Connected.
SQL> grant connect to t1;Grant succeeded.SQL> conn t1/t1
Connected.
SQL> select * from scott.t1; ID
----------
1SQL> select * from t1; --这时是不行的
select * from t1
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> conn / as sysdba --以SYS身份登录创建同义词
Connected.
SQL> create public synonym t1 for scott.t1;Synonym created.SQL> conn t1/t1
Connected.
SQL> select * from t1; --OK了 ID
----------
1