-->
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.  [ 4 posts ] 
Author Message
 Post subject: Exporting Session sql statements to file
PostPosted: Mon May 22, 2006 10:46 pm 
Newbie

Joined: Wed Apr 20, 2005 5:05 pm
Posts: 12
Hi,

Hibernate does an amazing job wireing everything together but instead of flushing the session and writing the batch sql to the db, i was wondering if it would/could just write the sql to a file for batch loading. Anybody tried this or has any thoughts?

Thanks,
LT


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 23, 2006 4:04 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
Maybe you can use the logger.
Set

Code:
log4j.logger.org.hibernate.SQL=debug


in you log4j.properties and create an file appender.

_________________
dont forget to rate !


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 23, 2006 8:10 am 
Newbie

Joined: Wed Apr 20, 2005 5:05 pm
Posts: 12
yeah i had thought about that. Couple problems with that though. I don't want it to actually execute the update/insert statements. I just want hibernate to write out what it would have done...and ill bulk load it later. Also, I don't want the random select statements that other session's might produce...

Good thought though...

LT


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 24, 2006 2:53 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
What about p6spy ?
Its a JDBC-Wrapper, i.e. it intercepts all
JDBC-calls before sending them to the database driver.

_________________
dont 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.  [ 4 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.