call_compile.sql
Posted feiyun8616的作坊 (半个程序员and dba)
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了call_compile.sql相关的知识,希望对你有一定的参考价值。
set echo off prompt prompt ================================================================================ prompt call_compile.sql &1 &2 &3 &4 &5 prompt
set echo off pagesize 0 feedback off verify off serveroutput on size 1000000
define v_input_un = &1
define v_input_pw = &2
define v_input_conn_str = &3
define v_reconnect_un = &4
define v_reconnect_pw = &5
define v_compile_work_file = ./log/compile_work_file_&v_input_un..sql
--
-- reconnect to make sure the following pl/sql block can be run successfully
--
connect &v_reconnect_un/&[email protected]&v_input_conn_str
set echo off pagesize 0 feedback off verify off serveroutput on size 1000000
-- -- construct the work file --
spool &v_compile_work_file
begin
if (‘&v_input_un‘ = ‘&v_na‘) then
dbms_output.put_line(‘-- Skipping this user ...‘);
else
dbms_output.put_line(‘@gen_compile &v_input_un &v_input_pw &v_input_conn_str‘);
end if;
end;
/
spool off
--
-- call the work file
--
@&v_compile_work_file
以上是关于call_compile.sql的主要内容,如果未能解决你的问题,请参考以下文章