We are trying to capture queries with sub-optimal unexpected column length from code hitting the database where columns defined are of limited length. How to capture such full queries with column length in Oracle. example: Java application with hibernate had a string column defined in hbm without length, this is hitting DB table where that column is defined varchar2(50). What we were complained is this application is throwing query with varchar2(2000) against the DB, how to capture this full query with column length coming from application ?
Env: Oracle 11g, 12c Java 1.7 with Hibernate