创建表空间_临时表空间_用户_指定表空间_授权

1、--删除已有的旧数据(表空间和临时表空间下)

--DROP TABLESPACE USER_DATA INCLUDING CONTENTS AND DATAFILES;

--DROP TABLESPACE USER_TEMP INCLUDING CONTENTS AND DATAFILES;

2、--创建表空间

CREATE  TABLESPACE user_data  LOGGING  DATAFILE  'D:\app\cphmvp\oradata\orcl\user_data201304013.DBF '   SIZE 100M  AUTOEXTEND  ON   NEXT  100M MAXSIZE 10240M  EXTENT MANAGEMENT LOCAL;

--创建临时表空间

CREATE   TEMPORARY  TABLESPACE  user_temp  TEMPFILE  'D:\app\cphmvp\oradata\orcl\user_temp20130413.DBF' SIZE 100M  AUTOEXTEND  ON NEXT  100M MAXSIZE 10240M  EXTENT MANAGEMENT LOCAL  

3、 --创建用户,指定表空间

CREATE   USER  cph IDENTIFIED  BY  cph  DEFAULT  TABLESPACE user_data  TEMPORARY  TABLESPACE user_temp;

4、 --授权  

grant connect,resource,dba to cph;  grant unlimited tablespace to cph;  

5、 --导入数据

-- cmd下  

imp cph/cph file=d:\database_bak\cph201304012.dmp log=d:\cph20130412_imp.log buffer=10000000 rows=y ignore=y full=y

6、备份数据 补充

exp userid=cph/cph@orcl owner=cph file=d:\cph201304012.dmp log=d:\cph20130412_imp.logbuffer=67108864 statistics=none grants=n consistent=y  

 

exp userid=pyc2/pyc2 owner=pyc2 file=d:\pyc2_20130801.dmp log=d:\pyc2_20130801.log buffer=67108864 statistics=none grants=n consistent=y

 

 

posted @ 2013-09-04 22:40  cphmvp  阅读(446)  评论(0编辑  收藏  举报
爬虫在线测试小工具: http://tool.haoshuju.cn/