Skip to Main Content

SQLcl: MCP Server & SQL Prompt

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!

Project export skips instead of/schema triggers

Oleh TyshchenkoAug 25 2025 — edited Aug 25 2025

Hi,

I am using SQLcl 25.2.2 and connecting to an Oracle 19c database.

I have noticed an issue with project export when it seems to skip all my instead of triggers on views as well as my schema level triggers (e.g. after logon). To verify this I created a simple testcase consisting of a schema with after logon trigger, a table, and a view with instead of trigger. Running project export produces

SQL> project export
…
-------------------------------
TABLE                         1
VIEW                          1
-------------------------------
Exported 2 objects
…

and neither of the triggers is included in the src/ folder.

Using -debug option (see attachments) I can see why my schema level trigger is being skipped. Since it did not tie to a table/view the query

/* Dictionary query against ALL_TRIGGERS: */
select * from (SELECT 
TRIGGER_NAME OBJECT_NAME, 
TRIGGER_NAME NAME, 
OWNER, 
OWNER OBJECT_OWNER, 
OWNER TRIGGER_OWNER, 
TABLE_NAME, 
TABLE_OWNER, 
TRIGGER_TYPE, STATUS, 
'TRIGGER' OBJECT_TYPE 
, 'ALL_TRIGGERS' EXPORT_TYPE 
FROM  All_triggers) All_triggers     where 1=1
--- filters ---
…
   and (table_name not like 'BIN$%') --<-- sqlcl internal.fixed.filters
…

just can't see it (column table_name is null in this case). A possible fix is to modify the query to handle NULL values, e.g.:

SELECT 
TRIGGER_NAME OBJECT_NAME, 
TRIGGER_NAME NAME, 
OWNER, 
OWNER OBJECT_OWNER, 
OWNER TRIGGER_OWNER, 
nvl(TABLE_NAME, 'Not applicable') TABLE_NAME, 
TABLE_OWNER, 
TRIGGER_TYPE, STATUS, 
'TRIGGER' OBJECT_TYPE 
, 'ALL_TRIGGERS' EXPORT_TYPE 
FROM  All_triggers

For instead of trigger it successfully passes all the filters but still still excluded from the result. However, explicitly exporting the trigger works:

SQL> project export -o insteadof_trigger_name
…
-------------------------------
TRIGGER                       1
-------------------------------
Exported 1 objects

project-export-verbose-debug-o.txt

project-export-verbose-debug.txt

Comments
Post Details
Added on Aug 25 2025
0 comments
35 views