I have an PL/SQL Script that I'm trying to run from the command shell with SQLPLUS. However, whenever I go to run it, All I get back is a number and a cursor waiting for some input. When I hit enter, it just increments the number and repeats the process. Here is a dummy query that does the same thing
set serveroutput on DECLARE cursor getServerTime IS SELECT sysdate as t from dual; myTime getServerTime%ROWTYPE; BEGIN open getServerTime; FETCH getServerTime into myTime; dbms_output.put_line(myTime.t); close getServerTime; END;
to run this from the command shell I use:
sqlplus me/myPass@myDB @"dummy.sql"