Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Nested script calls from SQLPlus and usage of @@

Peter de VaalNov 25 2019 — edited Nov 25 2019

Working more than 25 years with Oracle DB I have hit a problem that got me puzzled.

I have developed database applications in the past and also in recent years, and always arrange my scripts in a directory structure, with e.g. in the toplevel directory a script create_all.sql, which will call other scripts for all DDL and for DML for meta/reference data and optionally for seeddata. It e.g. calls a script ddl/create_all_tables.sql, which again calls a script for each table in subdirectory ddl/tables. All calls to other scripts are done using the '@@' syntax. This works very well when running the scripts from SQL Developer or SQLcl, but SQLPlus cannot find the third level scripts anymore. Apparantly the '@@' does not work recursively. I have been using SQLcl for the past 5 years, and really cannot remember I did it differently with SQLPlus in the past.

Now my customer still deploys with SQLplus, so my directory structure seems to be a problem. Any suggestions?

This post has been answered by AndrewSayer on Nov 25 2019
Jump to Answer
Comments
Post Details
Added on Nov 25 2019
2 comments
1,050 views