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. Mac下svn的使用

    1.从本地导入代码到服务器(第一次初始化导入) 在终端中输入 svn import /Users/apple/Documents/eclipse_workspace/weibo svn://local ...

  2. 《JS权威指南学习总结--6.3删除属性》

    内容要点: 一.delete运算符可以删除对象的属性.它的操作数应当是一个属性访问表达式.让人感到意外的是,delete只是断开属性和宿主对象的联系,而不会去操作属性中的属性: delete book ...

  3. POJ 1860 Currency Exchange(SPFA+邻接矩阵)

    ( ̄▽ ̄)" #include<iostream> #include<cstdio> #include<cmath> #include<algori ...

  4. 浙江大学 pat 题解---58

    1058. A+B in Hogwarts (20) 时间限制 50 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue If you ...

  5. Udemy - Angular 2 - The Complete Guide 笔记

    1. install > npm install -g angular-cli 2. create app > ng new first-app 3. build app > cd ...

  6. treeview自动从表中添加标题和列值做目录的方法2

    treeview自动从表中添加标题和列值做目录的方法2,该方法是借鉴万一老师的 http://www.cnblogs.com/del/archive/2008/05/15/1114450.html 首 ...

  7. Chapter 15_2 编写模块的基本方法

    在Lua中创建一个模块最简单的方法是:创建一个table. 并将所有需要导出的函数放入其中,最后返回这个table. 下例中的inv声明为程序块的局部变量,就是将其定义成一个私有的名称: local ...

  8. iOS解析后台返回的二进制图片

    UIEdgeInsets insets = {0,0,0,0}; [self.showidentifyButton setImageEdgeInsets:insets]; NSData *imageD ...

  9. 常用 ajax js 表单

    $(function () { /** * 图片点击放大处理 */ $('.mini_img').click(function () { $(this).hide().next().show(); } ...

  10. SELinux Policy Macros

    参考:http://selinuxproject.org/page/NB_RefPolicy Directory Macros macro expansion getattr_dir_perms ge ...