Summary
Getting (ORA-00900 invalid SQL statement) error for DB query monitor after declare a variable on the query.
Question
Sitescope DB query monitor supports only direct SQL queries and not any PL/SQL kind of statements like variable declarations, set, define, conditional blocks etc.
Example:
Good query:
select username from v$session where username like 'u_name'
Problematic query:
define u_name = 'APPS' select username from v$session where username like 'u_name'; undefine u_name
Answer
The following CR have being raised for the same, the development team will implement this functionality as a new feature on a future version: