• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle identify sql statement from servlet or jsp

 
Ionut Putinei
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

Can e servlet or jsp that does someting in database(dml) be written in such a manner that i can identify from database the source of the sql?

thanks


 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SQL is SQL. If you want something different to happen depending on where something is being executed from you'd have to write it that way.
 
David Rolfe
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's nothing to stop you from putting whatever you like into a comment as part of the SQL staements being issued:

SELECT /* This is freds SQL */ * FROM emp;

If you can get access to the SQL statements the database knows about you can find *your* sql fairly easy.

If your database is Oracle you should google the following:

Oracle v$session
dbms_application_info.set_module
oracle userenv


David Rolfe
Orinda Software, Dublin Ireland.

Makers of OrindaBuild, a Java Web Service Generator for Oracle.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic