set echo on feedback on

spool ./log/01_change_schema.log

-- -- schema change to v_idocdata_un --

-- -- switch to application user, use 业务 变量 --

connect &v_testdata_un/&v_testdata_pw@&v_conn_str

show   user

prompt &v_conn_str

prompt &v_conn_str

----------------------------- ---Developer Section place the code here -----------------------------

-- -- 执行变更 --

@./rollout/01_schema_rollout.sql

----
connect &v_testdata_un/&v_testdata_pw@&v_conn_str
show   user
prompt &v_conn_str

--赋权限给用户
@call_grant_dml &v_testusr_un
@call_grant_dml &v_testpatch_un
@call_grant_sel &v_testusr_un
@call_grant_sel &v_testpatch_un
@call_grant_sel &v_testquery_un
@call_grant_exec &v_testusr_un
@call_grant_exec &v_testpatch_un
disc

-- parameters

--   define v_input_un             = &1

--   define v_input_pw             = &2

--   define v_input_conn_str       = &3

--   define v_input_owner          = &4

--   define v_reconnect_un         = &5

--   define v_reconnect_pw         = &6

--建议同义词

@call_create_syn &v_testusr_un  &v_testusr_pw &v_conn_str &v_testdata_un &v_testdata_un &v_testdata_pw

@call_create_syn &v_testpatch_un  &v_testpatch_pw &v_conn_str &v_testdata_un &v_testdata_un &v_testdata_pw

@call_create_syn &v_testquery_un  &v_testquery_pw &v_conn_str &v_testdata_un &v_testdata_un &v_testdata_pw

--编译实效对象

@call_compile &v_testdata_un &v_testdata_pw &v_conn_str &v_testdata_un &v_testdata_pw

@call_compile &v_testusr_un &v_testusr_pw &v_conn_str &v_testdata_un &v_testdata_pw

@call_compile &v_testpatch_un &v_testpatch_pw &v_conn_str &v_testdata_un &v_testdata_pw

@call_compile &v_testquery_un &v_testquery_pw &v_conn_str &v_testdata_un &v_testdata_pw

spool off;
prompt ================================================================================
prompt Checking logs in the following directory ...
prompt
host pwd
prompt
prompt ======================================== grep -i 'ora-'
host   grep -i 'ora-'      ./log/*.log | sort -u
prompt
prompt ======================================== grep -i 'sp2-'
host   grep -i 'sp2-'      ./log/*.log | sort -u
prompt
prompt ======================================== grep -i '^Warning:'
host   grep -i '^Warning:' ./log/*.log | sort -u
prompt

01_change_schema.sql的更多相关文章

  1. 最近帮客户实施的基于SQL Server AlwaysOn跨机房切换项目

    最近帮客户实施的基于SQL Server AlwaysOn跨机房切换项目 最近一个来自重庆的客户找到走起君,客户的业务是做移动互联网支付,是微信支付收单渠道合作伙伴,数据库里存储的是支付流水和交易流水 ...

  2. SQL Server 大数据搬迁之文件组备份还原实战

    一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 解决方案(Solution) 搬迁步骤(Procedure) 搬迁脚本(SQL Codes) ...

  3. Sql Server系列:分区表操作

    1. 分区表简介 分区表在逻辑上是一个表,而物理上是多个表.从用户角度来看,分区表和普通表是一样的.使用分区表的主要目的是为改善大型表以及具有多个访问模式的表的可伸缩性和可管理性. 分区表是把数据按设 ...

  4. SQL Server中的高可用性(2)----文件与文件组

        在谈到SQL Server的高可用性之前,我们首先要谈一谈单实例的高可用性.在单实例的高可用性中,不可忽略的就是文件和文件组的高可用性.SQL Server允许在某些文件损坏或离线的情况下,允 ...

  5. EntityFramework Core Raw SQL

    前言 本节我们来讲讲EF Core中的原始查询,目前在项目中对于简单的查询直接通过EF就可以解决,但是涉及到多表查询时为了一步到位就采用了原始查询的方式进行.下面我们一起来看看. EntityFram ...

  6. 从0开始搭建SQL Server AlwaysOn 第一篇(配置域控)

    从0开始搭建SQL Server AlwaysOn 第一篇(配置域控) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www.cnb ...

  7. 从0开始搭建SQL Server AlwaysOn 第二篇(配置故障转移集群)

    从0开始搭建SQL Server AlwaysOn 第二篇(配置故障转移集群) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www ...

  8. 从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn)

    从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://w ...

  9. 从0开始搭建SQL Server AlwaysOn 第四篇(配置异地机房节点)

    从0开始搭建SQL Server AlwaysOn 第四篇(配置异地机房节点) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www ...

随机推荐

  1. 《JS权威指南学习总结--第九章 类和模板》

    内容要点: 一. 1.第六章详细介绍了JS对象,每个JS对象都是一个属性集合,相互之间没有任何联系.在JS中也可以定义对象的类,让每个对象都共享某些属性,这种"共享"的特性是非常有 ...

  2. hdu_2717_Catch That Cow_bfs

    题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=2717 题解:一维简单BFS,详细看代码,0ms. #include<cstdio> #in ...

  3. H5 - 在线编辑制作

    [百度H5商店]http://h5.baidu.com/store [木疙瘩在在线制作]http://www.mugeda.com/ [百度在线制作工具]http://h5.baidu.com/ [易 ...

  4. HDU 2614 Beat(DFS)

    题目链接 Problem Description Zty is a man that always full of enthusiasm. He wants to solve every kind o ...

  5. webapi中的路由前缀

    Route Prefixes Often, the routes in a controller all start with the same prefix. For example: public ...

  6. js 获取页面可视区域宽高

    获取浏览器窗口的可视区域高度和宽度,滚动条高度有需要的朋友可参考一下. 1.IE中,浏览器显示窗口大小只能以下获取: 代码如下复制代码 代码如下 document.body.offsetWidth d ...

  7. sql优化原则

    尽量使用性能高的比如left join等,尽量减少数据查询的column,尽量不要查询冗余数据,like的话“%%”是没有 办法使用索引的,但是“%”是可以使用索引的 having以前一直不知道到底真 ...

  8. tomcat源码分析(二)启动过程

    在Catalina的load方法中,首先初始化Server组件. // Start the new server if (server instanceof Lifecycle) { try { se ...

  9. redis高级实用特性(2)

    事务处理: redis对事务的支持目前还是比较简单,redis只能保证一个 client发起事务中的命令可以连续执行,而中间不会插入其他 client的命令,当一个client 在一个连接中发出mul ...

  10. jsp页面中EL表达式不能被解析

    原因是:在默认情况下,Servlet 2.4 / JSP 2.0支持 EL 表达式. 用maven插件的生成的webApp的项目结构比较老的是2.3的版本,只要将web中的开头定义换成2.4以上的定义 ...