java visualvm jdbc profiler: does it capture the final sql statements that are actually executed by the DB?

139 Views Asked by At

enter image description here

I am using JVisualVm's jdbc profiler to monitor my local java program.

It would capture something like this:

select * from reservation v where v.name like '%'%'

If you try to run this in pgadmin, it would throw error:

enter image description here

For PgAdmin to run it, we have to escape the single quote in the string:

select * from reservation where name like '%''%'

Basically we need to change ' to '' so that the string the sql does not get cut off into 2 pieces.

My question is: is visual vm's jdbc profiler able to capture the final sql statement that gets executed by the DB?

0

There are 0 best solutions below