Here is the config file for MySQL:
o
Properties that are database specific are:
hibernate.connection.driver_class: JDBC driver classhibernate.connection.url: JDBC URLhibernate.connection.username: database userhibernate.connection.password: database passwordhibernate.dialect: The class name of a Hibernate org.hibernate.dialect.Dialect which allows Hibernate to generate SQL optimized for a particular relational database. To change the database, you must:
Dialect used by Hibernate to talk to the databaseThere are two drivers to connect to SQL Server; the open source jTDS and the Microsoft one. The driver class and the JDBC URL depend on which one you use.
The driver class name is net.sourceforge.jtds.jdbc.Driver.
The URL format for sqlserver is:
jdbc:jtds:sqlserver://[:][/][;=[;...]]
So the Hibernate configuration would look like (note that you can skip the hibernate. prefix in the properties):
net.sourceforge.jtds.jdbc.Driver
jdbc:jtds:sqlserver://[:][/]
sa
lal
org.hibernate.dialect.SQLServerDialect
...
The driver class name is com.microsoft.sqlserver.jdbc.SQLServerDriver.
The URL format is:
jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]
So the Hibernate configuration would look like:
com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:sqlserver://[serverName[\instanceName][:portNumber]];databaseName=
sa
lal
org.hibernate.dialect.SQLServerDialect
...