Forum OpenACS Q&A: executing remote sql from shell script

Collapse
Posted by arief zj on
Hi,
i have a problem which is not pretty much related to OACS but very 
much on oracle+linux side. i need to execute a oracle stored 
procedure in remote database by invoking a shell script from my local 
machine. i decided to give a shot by just 
executing a *.sql file thru sqlplus in remote DB ie: 
SQL>@/path/file.sql (it works)

then i try from my local shell to the remote DB ie:
# /path/bin/sqlplus user/passwd@sid @/path/file.sql

but it returns 
"SP2-0310: unable to open 
file "/path/file.sql"". 
can anybody help me?
Collapse
Posted by Sebastiano Pilla on
The SQL*Plus executable and the script must be on the same machine for this to work. So you can have:
  • telnet to the remote machine, execute the remote SQL*Plus program and call the script stored on the remote machine
  • execute your local SQL*Plus program, connect to the remote DB and call the script stored on your local machine