I want to run a command on remote database (oracle) from local server using sqlplus, eg:

sqlplus user/pass@db "command"

What's the syntax for it?

I want to use the command exit (from database) just to test something in a unix script.


try this in the below example i am calling test_procedure.

sqlplus "username/password@tns_name" <<\!

exec test_procedure();

  • Use this from comment --> sqlplus "username/password@tns_name" <<! exec test_procedure(); ! – SrikanthM Mar 7 '11 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy