oracle备份还原数据库
2016-02-01 10:55
344 查看
首先到对应bin目录下打开cmd(windows),linux用相应终端链接;eg:D:\app\sun\product\11.2.0\dbhome_1\BIN
用户备份:exp u_tdms/p_tdms@tdms_121 owner=u_tdms rows=y indexes=n compress=n buffer=65536 file=D:/tdms_121.dmp log=D:/tdms_121.log;
表备份: exp u_tdms/p_tdms@tdms_121 rows=y indexes=n compress=n buffer=65536 file=tdms_121_principal.dmp log=tdms_121_principal.log tables=tdms.principal;
完全备份:exp u_tdms/p_tdms@tdms_121 rows=y indexes=n compress=n buffer=65536 full=y file=121.dmp log=121.log;
表模式恢复:imp hfsys/123@localhost fromuser=u_tdms touser=hfsys rows=y indexes=n commit=y buffer=65536 file=tdms_121.dmp log=tdms_121.log;
用户模式恢复: imp hfsys/123@localhost fromuser=u_tdms touser=hfsys rows=y indexes=n commit=y buffer=65536 file=tdms_121_principal.dmp log=tdms_121_principal.log;
全库模式恢复: imp hfsys/123@localhost rows=y indexes=n commit=y full=y ignore=y buffer=65536 file=121.dmp log=121.log;
在导入时登陆账号必须是dba权限,如需要重输密码可以在账号处如下这样写:hfsys as sysdba;然后键入密码。表模式恢复fromuser=u_tdms处的u_tdms是上面导出是的账号,而非本次登陆的账号。
命令相关说明详见:
http://www.cnblogs.com/mfryf/archive/2013/06/16/3138466.html
用户备份:exp u_tdms/p_tdms@tdms_121 owner=u_tdms rows=y indexes=n compress=n buffer=65536 file=D:/tdms_121.dmp log=D:/tdms_121.log;
表备份: exp u_tdms/p_tdms@tdms_121 rows=y indexes=n compress=n buffer=65536 file=tdms_121_principal.dmp log=tdms_121_principal.log tables=tdms.principal;
完全备份:exp u_tdms/p_tdms@tdms_121 rows=y indexes=n compress=n buffer=65536 full=y file=121.dmp log=121.log;
表模式恢复:imp hfsys/123@localhost fromuser=u_tdms touser=hfsys rows=y indexes=n commit=y buffer=65536 file=tdms_121.dmp log=tdms_121.log;
用户模式恢复: imp hfsys/123@localhost fromuser=u_tdms touser=hfsys rows=y indexes=n commit=y buffer=65536 file=tdms_121_principal.dmp log=tdms_121_principal.log;
全库模式恢复: imp hfsys/123@localhost rows=y indexes=n commit=y full=y ignore=y buffer=65536 file=121.dmp log=121.log;
在导入时登陆账号必须是dba权限,如需要重输密码可以在账号处如下这样写:hfsys as sysdba;然后键入密码。表模式恢复fromuser=u_tdms处的u_tdms是上面导出是的账号,而非本次登陆的账号。
命令相关说明详见:
http://www.cnblogs.com/mfryf/archive/2013/06/16/3138466.html
相关文章推荐
- Oracle修改字段类型方法总结
- jsp+oracle 排序分页+Pageutil类
- Oracle 根据sid查询pid
- Oracle 分块导出数据备份
- Oracle 基于Windows访问带端口的远程服务器
- Oracle 额外增加表空间
- Oracle 查看正在运行的Job
- Oracle 创建表空间
- Oracle 查看表空间信息
- windows上安装oracle 12c到69%时卡住不动解决方案
- Oracle 重新解析表中索引令其查询速度加快
- Oracle 统计一个字段中某字符出现的次数
- Oracle 删除表空间
- oracle的sqlnet.ora , tnsnames.ora , Listener.ora 文件的作用
- Oracle 查询那些表存在外键
- Oracle 导入指定表
- ORACLE-RAC-11G-R2_INSTALL
- Oracle 查看正在运行的存储过程
- ORACLE-12C-RAC INSTALL
- Oracle的优化器是CBO,所以对象的统计数据对执行计划的生成至关重要