近期又遇到了ORACLE建表的问题,趁着有时间,总结一下吧。
查询表空间
select tablespace_name from dba_tablespaces;
创建表空间
create tablespace project datafile 'd:/data/xx.dbf' size 10M
删除表空间
drop tablespace project including contents and datafiles
创建用户
create user admin identified by admin default tablespaceproject ;
create user project default tablespace project
temporary tablespace TEMP profile DEFAULT
password expire quota unlimited on project;
赋予权限
grant connect,resource to admin default tablespaceproject with admin option;
grant unlimited tablespace to admin with admin option;
alter user admin default tablespace project ;
删除权限
revoke connect from admin
删除用户
drop user admin cascade
导入数据库
imp admin/admin@orcl file='d:/data/xx.dmp' ignore=y full=y
exp admin/admin@127.0.0.1:1521/db file= c:\db.dmp full=y