Oracle 导入导出表空间完整流程

exp ptsys/ptsys:10.2.17.42:1521/orcl file="D:/ptsys.dmp" ----导出表空间
imp ptsys/ptsys file="D:/ptsys.dmp" full=y  -----------导入表空间


drop tablespace piccoa including contents and datafiles; -----删除表空间
drop user piccoa cascade;  ------删除用户

 -----创建表空间   路径为oracle dbf文件路径
create tablespace piccoa datafile 'D:\oracle\product\10.2.0\oradata\orcl\piccoa.dbf' size 200m;  
alter database datafile  'D:\oracle\product\10.2.0\oradata\orcl\piccoa.dbf' autoextend  on next 50m maxsize unlimited;

---创建用户
create user piccoa identified by piccoa default tablespace piccoa temporary tablespace temp profile default;  -----创建临时表
grant dba,connect,resource,imp_full_database,exp_full_database to piccoa;   ----赋予用户权限
alter user piccoa quota unlimited on piccoa;
 

你可能感兴趣的:(数据库)