I have a web application in which users enter arbitrary sql queries for subsequent batch processing. We want to check the syntax of the request without actually executing it. Some of the requests will take a lot of time, so we donβt want to execute them. I am using Oracle dbms_sql.parse for this.
However, now I have a situation where I need to know the number and type of columns of the result set. Is there a way to do this without actually executing the request? That is, for Oracle to analyze the query and tell you what result the data types / names will return when the query is actually executed? I am using Oracle 10g and this is a Java 1.5 / Servlet 2.4 application.
Edit: Users who enter queries are already users in the database. They authenticate my application with the credentials of their database, and requests are made using these credentials. Therefore, they cannot embed any queries that they could not fulfill simply by connecting to sqlplus.
source share