1、查看当前用户所在表空间
select default_tablespace from dba_users where username='登录用户名'
2、查看表空间下有哪些表
select TABLE_NAME,TABLESPACE_NAME from dba_tables where TABLESPACE_NAME='表空间名'
3、查看当前表空间下有哪些用户
select distinct s.owner from dba_segments s where s.tablespace_name ='表空间名'
注:表空间名统一要大写
================================================================================
sqlplus / as sysdba
1、创建新用户
create user username identified by password;
username为用户名 password为密码
2、创建表空间
create tablespace tablespacename datafile '/oracle/oradata/XX.dbf' sizeXXG;
tablespacename 为表空间名
==============================================================================
将一个用户下的表导入另一个用户
1、导出 exp 用户名/密码 owner=导出用户名 file=/oracle/XX.dmp
2、导入 imp 用户名/密码 fromuser=导出用户名 touser=导入用户名 file=/oracle/XX.dmp
若导入失败则有可能为新用户没有权限
执行 SQL>grant imp_full_database to 用户名;