hibernate configuration file for sql server 2008
To change the database,
you must:
1.
Provide an appropriate
JDBC driver for the database on the class path,
2.
Change the JDBC
properties (driver, url, user, password)
3.
Change the Dialect used by Hibernate to
talk to the database
<hibernate-configuration>
<session-factory>
<property
name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property
name="hibernate.connection.url">jdbc:sqlserver://127.0.0.0;databaseName=glproc</property>
<property
name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"> </property>
<property
name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property
name="hibernate.hbm2ddl.auto">create</property>
<property
name="dialect">org.hibernate.dialect.SQLServer2008Dialect</property>
<!-- Mapping files -->
<mapping resource="hbm/cXX.hbm.xml"/>
</session-factory>
</hibernate-configuration>
No comments:
Post a Comment