oracle8 备份与恢复(exp/imp)

1.start/cmd:exp system/manager@ea21sg2t full=y file=e:/oracle/ea21sg2t.dmp log=ea21sg2t.log 

2.create database.

3.start/cmd:svrmgrl

connect internal/oracle@ea21sg2t

@f:/setupOracle/tablespace.sql

tablespace.sql:

spool E:/oracle/admin/ea21sg2t/create/createdb1_ea21sg2tidx.log
drop tablespace RHOMBUS_CM_TS_DATA including contents;      
CREATE TABLESPACE RHOMBUS_CM_TS_DATA                                                             
DATAFILE 'E:/ORACLE/ORADATA/ea21sg2t/cm/CMMODULE01_RHOMBUSSG6T.DBF' SIZE 100M REUSE;    
drop tablespace EA21_MF_TS_DATA including contents;      
CREATE TABLESPACE EA21_MF_TS_DATA                                                              
DATAFILE 'E:/ORACLE/ORADATA/ea21sg2t/mf/mfmodule01_ea21sg2t.dbf' SIZE 1400M REUSE;       
drop tablespace EA21_QT_TS_DATA including contents;                                      
CREATE TABLESPACE EA21_QT_TS_DATA                                                              
DATAFILE 'E:/ORACLE/ORADATA/ea21sg2t/qt/qtmodule01_ea21sg2t.dbf' SIZE 500M REUSE;          
drop tablespace EA21_CO_TS_DATA including contents;                                            
CREATE TABLESPACE EA21_CO_TS_DATA                                                              
DATAFILE 'E:/ORACLE/ORADATA/ea21sg2t/co/comodule01_ea21sg2t.dbf' SIZE 1200M REUSE;    
drop tablespace EA21_SI_TS_DATA including contents;                                            
CREATE TABLESPACE EA21_SI_TS_DATA                                                              
DATAFILE 'E:/ORACLE/ORADATA/ea21sg2t/si/simodule01_ea21sg2t.dbf' SIZE 200M REUSE;    

..................................

If there is not  the directory such as cm,mf,qt,co,si,you must create the directory fistly .

4.imp system/manager@ea21sg2t file=e:/oracle/ea21sg2t.dmp log=d:/oracle/ea21sg2t.log full=y grants=y

if there is error,after opening another start/cmd:alter user system identified by manager,try above command again.

caution:if the imp failed, you can try again after removing all table using  truncate table t1; truncate table t2;.If there is a error such as "warning objects were exported by EXP_USER ,not by you :",you can try it again after changing the system/manager to developer/developer.

5.oracle dba studio/storage/tablespaces,change the size according to the percent such as system,temp.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值