zoukankan      html  css  js  c++  java
  • ant 配置 和测试 1

    配置路径

    D:dbachangeUATunityschema est

     ----v0 版本

    sql.xml   (默认target 是versionfinal ,也就是最终版本)

    --versionfinal ,将会执行2条语句 ,一条是01_schema_rollout.sql,第二条 是1.sql

    --vesrion1  ,     将会执行version 1

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="DBHandler" basedir="." default="versionfinal">
     <target name="versionfinal">
     <exec executable="cmd.exe">
      <arg line="/c sqlplus /nolog @D:dbachangeUATunityschema	est1_schema_rollout.sql"/>
    </exec>
    <exec executable="cmd.exe">
      <arg line="/c sqlplus /nolog @D:dbachangeUATunityschema	est
    ollout1.sql"/>
    </exec>
    </target>
    
    <target name="version1">
    <exec executable="cmd.exe">
      <arg line="/c sqlplus /nolog @D:dbachangeUATunityschema	est
    ollout2.sql"/>  
    </exec>
    
    </target>
    
    
    </project>
    

    执行方法:

    ant -f sql.xml version1  (只执行version1)

    ant -f sql.xml versionfinal  (只执行versionfinal)

    ant -f sql.xml                    (默认执行versionfinal)

    ---v1 版本

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="DBHandler" basedir="." default="versionfinal">
     <target name="versionfinal">
     <exec executable="cmd.exe">
      <arg line="/c cd D:dbachangeUATdbschema2016_TESTdb6.0__datapatch_1"/>
      <arg line="/c sqlplus /nolog @D:dbachangeUATdbschema2016_TESTdb6.0__datapatch_11_schema_change_rollout.sql"/>
    </exec>
    </target>
    
    <target name="version1">
    <exec executable="cmd.exe">
      <arg line="/c sqlplus /nolog @D:dbachangeUATdbschema2016_TESTdb6.0_datapatch1_schema_change_rollout.sql"/>  
    </exec>
    
    </target>
    
    
    </project>

     ---Version 2

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="DBHandler" basedir="." default="versionfinal">
     
     <target name="version2">
     <property name="src2" location="D:dbachangeUATdbschema2016_10_18db6.0__datapatch_1"/>
     <exec dir="${src2}"  executable="cmd.exe">
      <arg line="/c sqlplus /nolog @D:dbachangeUATdbschema2016_10_18db6.0__datapatch_11_schema_change_rollout.sql"/>
    </exec>
    </target>
    
     <target name="version2_reg">
     <property name="src2" location="D:dbachangeUATdbschema2016_10_18db6.0__datapatch_1"/>
     <exec dir="${src2}"  executable="cmd.exe">
      <arg line="/c sqlplus /nolog @D:dbachangeUATdbschema2016_10_18db6.0__datapatch_11_schema_change_regress.sql"/>
    </exec>
    </target>
    
    
    <target name="version1">
     <property name="src1" location="D:dbachangeUATdbschema2016_10_18db6.0_datapatch"/>
     <exec dir="${src1}"  executable="cmd.exe">
      <arg line="/c sqlplus /nolog @D:dbachangeUATdbschema2016_10_18db6.0_datapatch1_schema_change_rollout.sql"/>  
    </exec>
    
    </target>
    
    
    </project>

     --v3 版本

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="DBHandler" basedir="." default="versionfinal">
     
     <target name="version2">
     <property name="src2" location=".EPP6.0__datapatch_1"/>
     <exec dir="${src2}"  executable="cmd.exe">
      <arg line="/c sqlplus /nolog @.1_schema_change_rollout.sql"/>
    </exec>
    </target>
    
     <target name="version2_reg">
     <property name="src2" location=".EPP6.0__datapatch_1"/>
     <exec dir="${src2}"  executable="cmd.exe">
      <arg line="/c sqlplus /nolog @.EPP6.0__datapatch_11_schema_change_regress.sql"/>
    </exec>
    </target>
    
    
    <target name="version1">
     <property name="src1" location=".epp6.0_datapatch"/>
     <exec dir="${src1}"  executable="cmd.exe">
      <arg line="/c sqlplus /nolog @.1_schema_change_rollout.sql"/>  
    </exec>
    
    </target>
    
    
    </project>

    01_schema_rollout.sql

    pause
    disconn

    调整为

    begin
    DBMS_LOCK.SLEEP(20);
    end;
    /

  • 相关阅读:
    Android 操作系统的内存回收机制(转载)
    如何减少代码中的分支语句
    Android中动画学习
    Android中 AsyncTask
    Linux安装后更新系统
    看百度宣传片
    可爱的linux mint 11
    ubuntu 修改root密码
    SHA256加密算法封装[我的代码库]
    使用maven,svn和CruiseControl做持续集成
  • 原文地址:https://www.cnblogs.com/feiyun8616/p/6101645.html
Copyright © 2011-2022 走看看