I am preparing a screen in which user will input an anonymous block (declare … begin … end) of plsql, and i will save it’s block into a file an run it when it is necessary.
But I want to validate the user’s input against my database whether it has syntax errors or not before execution. when i googled it i found that I can use antlr, but i could not found any working sample. can anyone show me a sample, I am open for other solutions within the java and plsql context.
I am preparing a screen in which user will input an anonymous block (declare
Share
You can parse the plsql command with DBMS_SQL:
Be careful with what you parse though: DDL will be executed on parse (!).