Thursday 17 July 2014

Shell script that call stored procedure by the sqlplus

If you want to write the .sh file that will call sqplus that should execute the sql query, you can try something like this:

 sqlplus <db_username>/<db_password>@//<db_host>:<db_port>/<db sid> <<EOF  
 exec <function_package_name>.<function_name>;  
 exit;  

This example shoul call stored procedure. You can change it to execute any sql query.

No comments:

Post a Comment