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. 常用JavaScript字符串方法简述

    网址来源:http://www.html-js.com/article/JS-rookie-in-the-rookie-to-start-learning-to-fly-the-commonly-us ...

  2. 复习i++和++j

    一,新建一个Default.aspx页面 在Default.aspx.cs

  3. 《JS权威指南学习总结--第五章语句》

    内容要点: 一.throw语句     所谓异常是当发生了某种异常情况或错误时产生的一个信号.     抛出异常就是用信号通知发生了错误或异常状况.     捕获异常时指处理这个信号,即采取必要的手段 ...

  4. 如何使用cygwin去编译cocos2dx项目中的C++文件

    将生成的cocos2dx的Android项目导入到eclipse 可以先测试一下如何编译C++项目: 1.打开cygwin,进入到Android项目对应的目录下面去: 2.编译脚本 在编译脚本之间,如 ...

  5. Java 中值传递和引用传递 区分

    详细参见  http://blog.csdn.net/zzp_403184692/article/details/8184751

  6. Matlab - 线性方程组求解

    常用函数:det 计算矩阵的行列式的值inv 求矩阵的逆阵rank 求矩阵的秩[V D]=eig(A) 求矩阵A的特征值和特征向量poly 求矩阵的特征多项式rref 用初等变换将矩阵化成行阶梯形nu ...

  7. eclipse启动Heritrix

    首先下载heritrix-1.14.4-src源码.可以在http://sourceforge.net/projects/archive-crawler/files/archive-crawler ( ...

  8. UILabel设置富文本格式显示

    实例化方法和使用方法 实例化方法: 使用字符串初始化 - (id)initWithString:(NSString *)str; 例: NSMutableAttributedString *Attri ...

  9. ios 中Category类别(扩展类)小结

    类别 类别是一种为现有的类添加新方法的方式.利用Objective-C的动态运行时(runtime)分配机制,可以为现有的类添加新方法,这种为现有的类添加新方法的方式称为类别catagory,他可以为 ...

  10. User already has more than 'max_user_connections' active connections

    vi /etc/my.cnf修改  max_user_connections 参数的数值,重启 MySQL 服务器