####expdp.sh

###### ------------- --   UAT   -- -------------

@D:\dba\change\UAT\eais\env\env_eaisuat.sql

-------------- --   PROD   -- -------------- --

@D:\dba\change\PROD\eais\env\env_eaisprod.sql

conn &v_system_un/&v_system_pw@&V_CONN_STR;

col dt new_value dt noprint

select to_char(sysdate, 'YYYYMMDD_HH24MISS') dt from dual;

define v_log_file=.\log\01_rollout_&dt..log spool &v_log_file

set echo on feedback on verify on

------------------------------------------ --   1. Check Invalid Ojbect (before)   -- ------------------------------------------

--

conn &v_system_un/&v_system_pw@&V_CONN_STR;

@chk_invalid.sql

------------------------------------------ --   2. Check dba_direcotry (before)   -- ------------------------------------------

conn &v_system_un/&v_system_pw@&V_CONN_STR;

select DIRECTORY_NAME,DIRECTORY_PATH from dba_directories;

------------------------------------------ --   3. spool exp scripts   -- ------------------------------------------

set feedback off

set pagesize 0

set heading off

set verify off

set linesize 200

set trimspool on

spool c:/数据库备份.bat;

select 'expdp &v_system_un/&v_system_pw@&V_CONN_STR file=&V_CONN_STR&dt..dmp directory=DATA_PUMP_DIR log=&V_CONN_STR&dt..log schemas=''&v_eaisdata_un'',''&v_eaisusr_un'',''&v_eaisquery_un'',''&v_eaispatch_un'' parallel=2' from dual;

spool off

set feedback on

set pagesize 9999

set heading on

set verify on exit

####impdp.sh

###### ------------- --   UAT   -- -------------

@D:\dba\change\UAT\eais\env\env_eaisuat.sql

-------------- --   PROD   -- -------------- --

@D:\dba\change\PROD\eais\env\env_eaisprod.sql

conn &v_system_un/&v_system_pw@&V_CONN_STR;

col dt new_value dt noprint

select to_char(sysdate, 'YYYYMMDD_HH24MISS') dt from dual;

define v_log_file=.\log\01_rollout_&dt..log spool &v_log_file

set echo on feedback on verify on

------------------------------------------ --   1. Check Invalid Ojbect (before)   -- ------------------------------------------

--conn &v_system_un/&v_system_pw@&V_CONN_STR;

@chk_invalid.sql

------------------------------------------ --   2. Check dba_direcotry (before)   -- ------------------------------------------

conn &v_system_un/&v_system_pw@&V_CONN_STR;

select DIRECTORY_NAME,DIRECTORY_PATH from dba_directories;

------------------------------------------ --   3. spool exp scripts   -- ------------------------------------------

set feedback off

set pagesize 0

set heading off

set verify off

set linesize 200

set trimspool on

spool c:/数据库恢复.bat;

select 'impdp &v_system_un/&v_system_pw@&V_CONN_STR file=&1.dmp directory=DATA_PUMP_DIR log=&V_CONN_STR&dt..log schemas=''&v_eaisdata_un'',''&v_eaisusr_un'',''&v_eaisquery_un'',''&v_eaispatch_un'' table_exists_action=replace  parallel=2' from dual;

spool off

set feedback on

set pagesize 9999

set heading on

set verify on exit

####设计思路

## expdp.sh输入变量

用户名: 密码: 文件名: 目录名: schema名字

输出变量 生成文件:

## 思路如下: 1. 2.

## impdp.sh输入变量

用户名: 密码: 文件名: 目录名: schema名字

输出变量 导入之前失效对象 生成文件:导出日志 导入之后失效对象

## 思路如下: 1. 2.

expdp.sh and impdp.sh的更多相关文章

  1. ubuntu.sh: 113: ubuntu.sh: Syntax error: "(" unexpected

    在ubuntu电脑上安装lnmp环境,执行下面命令时 sudo sh ubuntu.sh 报错误:ubuntu.sh: 113: ubuntu.sh: Syntax error: "(&qu ...

  2. 针对数据泵导出 (expdp) 和导入 (impdp)工具性能降低问题的检查表 (文档 ID 1549185.1)

    针对数据泵导出 (expdp) 和导入 (impdp)工具性能降低问题的检查表 (文档 ID 1549185.1) 文档内容 适用于: Oracle Database – Enterprise Edi ...

  3. Linux里startup.sh 和 shutdown.sh

    最近用socket编写了一个服务端程序,监听1024端口,检测客户端发来的请求,所在Linux里写启动和停止的脚本: 在Eclipse里java写好程序,右击导出生成 Runnable JAR fil ...

  4. lispbox 安装运行.sh的时候出现 lispbox.sh: 2: lispbox.sh: Bad substitution

    安装lispbox时使用tar命令将压缩文件解压之后cd进入之后在运行.sh文件时出现了如下情况. $ sh lispbox.sh lispbox.: lispbox.sh: Bad substitu ...

  5. adformsctl.sh 与 adformsrvctl.sh, 10.1.2 及10.1.3

    参考 http://blog.csdn.net/cai_xingyun/article/details/40393885 ,  adformsctl.sh 是开启forms oc4j ,  根据之后的 ...

  6. exp/expdp 与 imp/impdp命令导入导出数据库详解

    一.exp命令导出数据库 如何使exp的帮助以不同的字符集显示:set nls_lang=simplified chinese_china.zhs16gbk,通过设置环境变量,可以让exp的帮助以中文 ...

  7. ./test.sh . ./test.sh source ./test.sh的区别

    背景 今天写几个shell脚本,使用一个公共的config.sh,但是export出来的东西在另外的*.sh中不能直接用,这让我很惆怅,印象中就是可以export出来给别的shell用啊,只要不是下一 ...

  8. start-dfs.sh 和 start-all.sh的区别

    start-dfs.sh 只启动namenode 和datanode, start-all.sh还包括yarn的resourcemanager 和nodemanager 之前就所以因为只启动了star ...

  9. Whats the difference between service tomcat ./startup.sh and ./catalina.sh run

    stack overflow 给出的答案: catalina.sh run starts tomcat in the foreground, displaying the logs on the co ...

随机推荐

  1. JPA基本注解介绍

    一.@Entity •@Entity 标注用于实体类声明语句之前, 指出该Java 类为实体类,将映射到指定的数据库表. 如声明一个实体类 Customer,它将映射到数据库中的 customer 表 ...

  2. Python Cookbook - 1 - 数据结构和算法

    1 序列解压:通过*来通配 *a, b = somelist,   first, *mid, last = somelist,  a, *b = somelist 2 使用双向队列: from col ...

  3. android之服务service

    service的概念: 官方定义:在后台长时间的操作,没有用户界面,不与用户进行交互,在默认的情况下,service运行在应用程序进程的主线程中,如果需要在Service中处理一些网络连接等耗时操作, ...

  4. String与string的区别

    在C#中,string 是 System.String 的别名,所以基本上在使用时是没有差别的. 习惯上,我们把字符串当作对象时(有值的对象实体),我们用string.而我们把它当类时(需要字符串类中 ...

  5. hdu_5705_Clock("巴卡斯杯" 中国大学生程序设计竞赛 - 女生专场)

    题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5705 题意:给你一个时间和一个角度,问你下一个时针和分针形成给出的角度是什么时候 题解:我们可以将这个 ...

  6. LeetCode OJ 292.Nim Gam148. Sort List

    Sort a linked list in O(n log n) time using constant space complexity. 排序问题是我们遇到的一个老问题,从大一开始我们就学习了各种 ...

  7. how to stop a thread

    it seems all stop methods of thread have been deprecated by java. so how to stop a thread then? it i ...

  8. jquery:赋值

    Jquery的赋值语句 $("#txtStyle").val(value); 获取操作: var val = $('#test').val(); --

  9. 用tomcat6自定义域名

    第一步:tomcat配置 修改server.xml文件 8080端口 更改为 80端口 并在<Host name="localhost"  appBase="web ...

  10. HDU 5963 博弈

    http://acm.hdu.edu.cn/showproblem.php?pid=5963 题目大意:中文题 思路:看ICPC camp好了,简单易懂:https://async.icpc-camp ...