I have the following challange;
I would like to execute a batch of *.sql files on one database. The sql files are assumed to be named in ascending order of their execution sequence. So the main sql script should do a 'dir /s *.sql', then start each of the found scripts in order.
Is this possible ?
Below is something I found for SQL Server, but I want something similar for Oracle SQL Developer.
Thanks in advance.
Raymond
Batch_Files
in you local machine ,which will contain all the sql script that you want to execute , sql developer
.Create a file called batch.sql
in your Batch_Files folder . In Batch.sql
add the sql files that you want to execute in sequence.
@file1.sql
@file2.sql :
:
@fileN.sql
These files contains the code that you need to run in sequence .This is a very basic example.You can do various changes according to your need ,you can add anonymous block to print something after execution of files .I have not tested this is SQL-DEVELOPER
,but i think this will surely work for you .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.