How to execute the stored procedure from shell script

How to execute the stored procedure from shell script and is there any possibility to print the dbms output in a log file.

Hi
Since your question is not elaborate, I suggest to look at the below mentioned link. Hope this will answer your question:

The UNIX School: How to connect to sqlplus from Shell?

Thanks
Guru.

shell scripts cannot call Oracle stored procedures directly, and Oracle stored procedures (by default) do not return record sets.

Shell scripts can launch SQL*Plus and pass the name of a .sql file for SQLPlus to run, and that *.sql file can call a stored procedure, so indirectly shell scripts can run stored procedures.

Oracle stored procedures can return "ref cursors", but what do you want to do with (or, how will you use) the record set that you want the stored procedure to return?

sh -c 'sqlplus -s user/secret@server @your-sql-commands-file > logfile 2>&1'