4

Is there an Ibatis setting to view the generated SQL like how Hibernate has show_sql=true?

thanks

Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
romesub
  • 233
  • 4
  • 10

3 Answers3

6

Yes, turn up it's logging level.

matt b
  • 138,234
  • 66
  • 282
  • 345
0

You could try p6spy.

This is not exactly a Ibatis property setting to view the generated SQLs. p6spy is a kind of library you can easily plugin to your Java application.

It logs you the generated sql and also resultSet (Which is great, actually). I used for issue tracking in dynamic queries. It prints it in a log file.

This mkyong blog may give you how-to integrate it with your Ibatis. (mkyong-blog-fan :))

t0mm13b
  • 34,087
  • 8
  • 78
  • 110
Geez
  • 68
  • 1
  • 1
  • 7
0

No, you can't. Log it in your database server.

http://www.apachebookstore.com/confluence/oss/display/IBATIS/How+do+I+get+SqlMapClient+to+log+SQL+statements

iBatis get executed sql

Community
  • 1
  • 1
leonbloy
  • 73,180
  • 20
  • 142
  • 190