Reputation: 1
I'm trying to invoke a SQL script which resides on the server from my local machine. I haven't been able to get this to work through SQL*Plus or the ruby-oci8 interface.
Have tried @/abs/path/to/scriptname.sql and start /abs/path/to/scriptname.sql .
Any ideas? Is it even possible? What I've read seems to lead towards stored procedures. New to Oracle & PL/SQL, so sorry if this is trivial.
Upvotes: 0
Views: 544
Reputation: 22003
you cannot do this if the .sql file isn't on your machine, as SQLPLUS (a client side tool) would need to find and read the file on your machine.
if the script is more suitable for a stored procedure, then make it one then just call the API instead of using a adhoc sql script.
failing that, you'd have to either have a fileshare mounted on your machien pointing to the remote folder, or telnet/ssh into the remote server and run it though that.
Upvotes: 1