SQL>conn sys/password as sysdba; --以sys账户登录
SQL>create user user_name identified by password
SQL>default tablespace users
SQL>quota unlimited on users; --创建用户user_name
SQL>grant create session to user_name;
SQL>grant create table to user_name; --授权给用户user_name
接下来user_name可以创建表,且可对其所创建的表进行所有操作。
SQL>create user user_name identified by password
SQL>default tablespace users
SQL>quota unlimited on users; --创建用户user_name
SQL>grant create session to user_name;
SQL>grant create table to user_name; --授权给用户user_name
接下来user_name可以创建表,且可对其所创建的表进行所有操作。
SQL>select * from user1.old_table
sql> create user <user_name> identified by <passwd> default tablespace <tablespace_name> temporary tablespace si_temp;sql>grant dba, connect, resource, create table to <user_name>;sql>create table table_name (a varchar2(10));
SQL>select * from user1.old_table
提示说表不存在
如何解决?
SQL>conn sys/password as sysdba;
SQL>grant select to user2 on user1.old_table;
提示缺少on 关键字?
grant select on user1.old_table to user2
我建一个表 aaaaa 本来应该在user_new里面的,现在是存在于user_old
我跟据飞扬兄给的语句,建好了用户,但是现在用user_new登陆建表,提示【表空间‘system’中无权限】 如何解决这个问题,并将user_old的表aaaaa导入到user_new的表aaaaa?
事情是这样的:
我建一个表 aaaaa 本来应该在user_new里面的,现在是存在于user_old
我跟据飞扬兄给的语句,建好了用户,但是现在用user_new登陆建表,提示【表空间‘system’中无权限】 如何解决这个问题,并将user_old的表aaaaa导入到user_new的表aaaaa?----------------------------------------------------------------------
你的新建用户user_new是创建在了system表空间中,
如果你严格按照上面的语句来创建语句且赋予相应的权限,应该不会出现你说的这种现象。