Home  >  Article  >  Database  >  Oracle 数据备份与恢复

Oracle 数据备份与恢复

WBOY
WBOYOriginal
2016-06-07 16:48:341106browse

Oracle导出数据: 编写创建路径文件:create_dir.sql create or replace directory dmpdir as

Linux公社

首页 → 数据库技术

背景:

阅读新闻

Oracle 数据备份与恢复

[日期:2014-04-26] 来源:Linux社区  作者:Linux [字体:]

Oracle导出数据:
 
 编写创建路径文件:create_dir.sql
 
 create or replace directory dmpdir as 'E:\app\tmp';
  grant read, write on directory dmpdir to test;
  exit
 
 编写执行导出Bat文件:export.bat
 
 sqlplus system/root123@MYTEST @create_dir.sql
  expdp system/root123@MYTEST schemas=test directory=dmpdir dumpfile=MYTEST.DMP
 
  MYTEST要备份的数据库 

导入数据
 
  编写创建User文件:create_user.sql
 
drop user test2 cascade;
 create user test2 identified by password;
 grant connect, resource to test2;
 create or replace directory dmpdir as 'E:\app\tmp';
 grant read, write on directory dmpdir to test2;
 exit
 
 编写执行导入Bat文件:restore.bat
 
sqlplus system/root123@localhost:1521/MYTEST @create_user.sql
 impdp system/root123@localhost:1521/MYTEST  schemas=test directory=dmpdir dumpfile=MYTEST.DMP table_exists_action=replace remap_schema=test:test2

推荐阅读:

RMAN 配置归档日志删除策略

Oracle基础教程之通过RMAN复制数据库

RMAN备份策略制定参考内容

RMAN备份学习笔记

Oracle数据库备份加密 RMAN加密

本文永久更新链接地址:

linux

  • 0
  • MySQL源码安装

    ORA-09925: Unable to create audit trail file

    相关资讯       Oracle备份恢复  Oracle备份与恢复 

    图片资讯      

    本文评论   查看全部评论 (0)

    评论声明

    最新资讯

    本周热门

    Linux公社简介 - 广告服务 - 网站地图 - 帮助信息 - 联系我们
    本站(LinuxIDC)所刊载文章不代表同意其说法或描述,,仅为提供更多信息,也不构成任何建议。


    Copyright © 2006-2014 Linux公社 All rights reserved 浙ICP备06018118号

    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn