CREATE TABLESPACE与create user

su - oracle
sqlplus "/as sysdba"

删除
drop user wqettest cascade;

查看oracle表空间文件
select tablespace_name, file_id, file_name, round(bytes/(1024*1024),0) total_space from dba_data_files order by tablespace_name;

创建
CREATE TABLESPACE name 
DATAFILE ' E:\oracle\product\10.2.0\oradata\orcl\name.ora' SIZE 600M REUSE
AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;

create user username identified by password default tablespace name temporary tablespace temp;
grant connect,resource,create public database link,create view,drop public database link to username

有时需要DBA
GRANT CONNECT TO zjgsg;
GRANT RESOURCE TO zjgsg;
GRANT dba to zjgsg;
grant imp_full_database to XMISDATA;

查询外键关联
select * from user_cons_columns cl where cl.constraint_name = '外键名称'
;

你可能感兴趣的:(oracle)