19 April,2013 by Tom Collins
Question : In my application, I am receiving SQL from other application. I want to validate that SQL text on my client. I don’t want to add the performance overhead to the database , what options are available?
Answer: Parsing SQL code is an important part of code development . Parsing is the process of analysing a string of symbols , based on the syntax rules. There a number of options available and will depend on your circumstances.
Option 1 – Make a DB2 call and allow the database to validate the SQL code. If you don’t want the overhead , then restore a copy of the database onto a lower environment
Option 2 – Download a SQL Parser
General SQL Parser - Loads of features , but the documentation is poor. It’s a commercial tool but there is a free download
TSql100Parser Class in .net4 – Useful for SQL Server.Read More
JSQLParser – Creates Java classes hierarchy. Download
Hibernate – Not a parser but uses ANTLR for sql parsing
Trace sql statements in DB2 database
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |