-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: show sql: a way to see actual values?
PostPosted: Thu Sep 07, 2006 1:46 pm 
Newbie

Joined: Fri Jan 09, 2004 5:41 pm
Posts: 14
Just a quick question. Is there a way, with showsql=true, to see the actual values used in insert statements? What I'm seeing are sql statements like 'insert into table (col1, col2) values (?,?)', but I really need to see what those values are instead of ? placeholders.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 07, 2006 6:16 pm 
Newbie

Joined: Thu May 04, 2006 5:04 am
Posts: 17
Location: Austria
If you just need the information for debugging purposes you could use p6spy,
p6Spy is a JDBC driver which wraps around your actual JDBC driver and intercepts JDBC calls transparently to your application.
I have used it already with DB2 and Oracle.
You can find it here: http://www.p6spy.com/
I can't tell you if its ready for a production system, but it works very well on my workstation.

kind regards, Chris

_________________
Please don't forget to rate the posting if it helped you, thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 08, 2006 9:59 am 
Senior
Senior

Joined: Wed Aug 17, 2005 12:56 pm
Posts: 136
Location: Erie, PA (USA)
You need to turn on logging for Hibernate: specifically
Code:
log4j.logger.org.hibernate.type=debug
in log4j.properties.

WARNING: Hibernate uses commons-logging -- My example assumes that commons-logging is deferring to Log4j for configuration.

Good luck,
Curtis ...

_________________
---- Don't forget to rate! ----


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.