Parse SQL-statement in SQL-Plus

Giganews Newsgroups
Subject: Parse SQL-statement in SQL-Plus
Posted by:  Ole Hansen (ohahaa…@hotmail.com)
Date: 11 Dec 2004

Hi !

I have created an SQL-file "copy.sql", that I am executing from
SQL-Plus, using the following command:

sqlplus xal_supervisor/xal_supertest_psw@XALTST @copy.sql

copy.sql looks like this:
-------------------------
SET PAGES 9999
WHENEVER SQLERROR EXIT;
WHENEVER OSERROR EXIT;
SPOOL copy.log;

<SQL-statement 1>
/
<SQL-statement 2>
/
<SQL-statement 3>
/
....
<SQL-statement 999>
/
SPOOL OFF;
EXIT;
-------------------------

copy.sql is a BIG sql-file, with lots of statements, and it takes 5
ours to execute. It copies a lot of data...

My problem is, that there are some "syntax errors" and other errors in
the file. Therefore i want to PARSE the file, before i execute it.

I use SQL-Plus. How can i parse the entire file, before i execute it,
so that i can find the all the errors ???

Regards,
Ole
Oracle-newbie...

Replies