-->
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 With Parameters
PostPosted: Tue Dec 16, 2008 2:22 pm 
Newbie

Joined: Mon Oct 06, 2008 10:40 am
Posts: 12
Hibernate: 3.0.5

I am trying to see the SQL Parameters when I do "show_sql = true".

In my hibernate.properties file, I have "hibernate.show_sql = true".

Can someone please provide me with detailed instructions on how to enable parameters? I have been trying everything I can with log4j and cannot get it to work.


Thank you so much for your help.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 16, 2008 2:29 pm 
Newbie

Joined: Mon Dec 15, 2008 2:28 pm
Posts: 8
In your log4j configuration file set the following

org.hibernate.type=DEBUG

Be aware that in the logs, this will not show the value for your parameters in the query itself. Rather, there'll be additional log statements following the query log of the nature "Binding xxx to yyyy".

My understanding is that there isn't any setting to log the value of the parameters in the query itself.

_________________
Naresh
Please rate replies if they've helped you out.


Top
 Profile  
 
 Post subject: use proxy driver to get values
PostPosted: Wed Mar 18, 2009 3:48 pm 
Newbie

Joined: Wed Mar 18, 2009 10:30 am
Posts: 2
you need to use a proxy driver.
To get the values of the query use the P6SPY.

_________________
Srinivasa dutt Pulipaka
J2EE Architect Atlanta GA


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.