1
I have a arquivo.sql
, which has thousands of lines of scripts, containing, creations, changes, etc.
I need to run this file directly in PLSQL at SQL Window
, and nay can be via Command Window
.
Via
Command Window
, that way it works:
@c:\arquivo.sql
Via
SQL Window
, tried in the following ways, but without success:
1. By directly executing
@c:\arquivo.sql
Error:
ORA-00900: Invalid SQL statement
2. By executing directly
EXECUTE IMMEDIATE '@c:\arquivo.sql'
Error:
ORA-00900: Invalid SQL statement
3. Creating a precedent
CREATE OR REPLACE PROCEDURE p_run_script IS
BEGIN
EXECUTE IMMEDIATE '@c:\arquivo.sql';
END p_run_script;
/
BEGIN
p_run_script;
END;
/
Error:
ORA-00900: Invalid SQL statement ORA-06512: in
"P_RUN_SCRIPT", line 3 ORA-06512: in line 2
Observing: I cannot send this file to the server, nor create a directory on oracle, or use dbms_pipe
.
It doesn’t have to be a script-complete answer, but if you only talk about what you search for it helps.
Running remotely? Using SQL Plus?
– Jéf Bueno
No, via plsql mesmo.. Vlw @Inq
– David
It is only possible to do this via sql plus. I recommend you to create a precedent with your script.
– Wesley Ferreira