Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Pretty printing the exact query (with bind variables) executed by DBI?

by pfaut (Priest)
on Dec 18, 2007 at 02:11 UTC ( #657587=note: print w/replies, xml ) Need Help??


in reply to Pretty printing the exact query (with bind variables) executed by DBI?

That information may not be available. Oracle's OCI supports parameterized queries. The prepare step sends the statement with placeholders to the server for parsing and generation of an execution plan. The data is plugged in on the server at the time of execution. The full statement with data plugged into placeholders is never available to DBI or DBD::Oracle.

There may be other ways to find out, though. I know PostgreSQL can be told to keep a log of the statements it executes. If we knew what database you were working with, maybe someone who knows that database could tell you how to trace at the database.

90% of every Perl application is already written.
dragonchild
  • Comment on Re: Pretty printing the exact query (with bind variables) executed by DBI?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://657587]
help
Chatterbox?
[ambrus]: Petroza had trouble posting yesterday, but has posted Issues Fetching URL with a variable token since.
[mz2255]: Yes, just edited the scratchpad. Not sure if I'm doing something wrong, it's my first time.
[ambrus]: No, you're not doing anything wrong. It's just that our automatic spam filters confuse you with the spammers who post advertisments for online shops of counterfeit branded clothing.

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2017-10-19 15:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (255 votes). Check out past polls.

    Notices?