oracle 备份



cmd-》sqlplus
登陆用户名:conn as sysdba
口令:为空

--创建临时表空间
create temporary tablespace xzsp_liuan_temp
tempfile 'E:\oracle_data\xzsp_wuxi_temp.dbf'
size 32m
autoextend on
next 32m
extent management local;

--创建表空间
create tablespace xzsp_liuan
logging
datafile 'E:\oracle_data\xzsp_liuan.dbf'
size 32m
autoextend on
next 32m
extent management local;

--创建用户
create user xzsp_liuan identified by "123"
default tablespace xzsp_liuan
temporary tablespace xzsp_liuan_temp;

--授权
grant connect,resource,dba to xzsp_liuan;


===================================================================================


create user xzsp_liuan identified by "123"
default tablespace xzsp_liuan;
--还原库
imp xzsp_linshu/123@orcl fromuser=xzsp_linshu touser=xzsp_linshu file='' ignore=y;
--备份库
exp xzsp_linshu/123@orcl file='c:\xzsp_linshu20110720.dmp'

--删除表空间
drop tablespace gx_zjjk including contents and datafiles;
drop tablespace xzsp_langxi including contents and datafiles;

--删除用户
drop user gx_zjjk cascade;


alter user jx_zjjk account unlock;

drop tablespace xzsp_nt including contents and datafiles CASCADE CONSTRAINTS;


--备份数据库(oracle11G备份到oracle10G)

EXPDP USERID='xzsp_fuyun/zwfw123TH@orcl as sysdba' schemas=xzsp_fuyun directory=DATA_PUMP_DIR dumpfile=xzsp_fuyun20120831.dmp logfile=xzsp_fuyun20120831.log version=10.2.0.1.0

目录:app\Administrator\admin\orcl\dpdump下生成


--还原库(oracle11G还原到oracle10G)

将xzsp_fuyun20120801.dmp文件拷贝到了admin\orcl\dpdump目录下

IMPDP USERID='xzsp_fuyun/123@orcl as sysdba' schemas=xzsp_fuyun directory=DATA_PUMP_DIR dumpfile=1.DMP logfile=xzsp_fuyun.log version=10.2.0.1.0




[url]http://wenku.baidu.com/view/c7d426fbaef8941ea76e05d1.html[/url]
[url]http://baike.baidu.com/view/2973562.htm[/url]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值