CHHIBI AMOR
CHHIBI AMOR

Reputation: 1265

Show DBMS version in hibernate log

the problem I posed the in following question. becomes blocking, I tried to change the version of ojdbc14 to ojdbc6.

I want to display the version of the DBMS in the log, what properties I should add that to the JpaProperties displays the version of DBMS

Upvotes: 0

Views: 54

Answers (1)

JamesENL
JamesENL

Reputation: 6540

Hibernate should print out the dialect that it is using in the log files. I have my root logger set to INFO for the following to print out.

I imagine if you set log4j.logger.org.hibernate=INFO it should work.

Have a look in your server logs for the following lines:

HHH000412: Hibernate Core {4.2.8.Final} 04:33:28:0.472 
HHH000206: hibernate.properties not found 04:33:28:0.475 
HHH000021: Bytecode provider name : javassist 04:33:28:0.477 

//The line below will tell you what dialect Hibernate is using to connect 
//to your database. From there you should be able to work out what kind of 
//database it is
HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect 04:33:29:0.320 

HHH000399: Using default transaction strategy (direct JDBC transactions) 04:33:29:0.547 
HHH000397: Using ASTQueryTranslatorFactory 04:33:29:0.557 
HV000001: Hibernate Validator 4.3.1.Final 04:33:29:0.632 
HHH000229: Running schema validator 04:33:30:0.171 
HHH000102: Fetching database metadata 04:33:30:0.171 

Upvotes: 1

Related Questions