Calling a SQL Procedure with parameters from a unix script

Problem

You want to call a procedure with a parameter passed from Unix.

Solution

sqlplus /nolog  << EOF
CONNECT $v_sqllogin
declare 
v_release_name varchar2(100) := $v_release_name;
begin
   GNS_DEPLOYMENT_SUITE.create_file(v_release_name);
end;
/
exit;
EOF

($v_release_name is a local variable in the unix script)



Comments