I've been trying to connect with database in Eclipse using Hibernate. When my database is Postgresql all is ok, and I have a problem with MicrosoftSQL2008.
My server name is: .\SQLEXPRESSR2, login: admin password: admin name of db: hibernatedb and here there is my hibernate code:
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="connection.url">jdbc:sqlserver://.\SQLEXPRESSR2:1433/hibernatedb</property>
<property name="connection.username">admin</property>
<property name="connection.password">admin</property>
<!-- JDBC connection pool (use the built in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect - generate SQL for a particular database -->
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<!-- Disposable the second-level cache -->
<property name="catch.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL statements -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">create</property>
<!-- Names the annotated entity class-->
<mapping class="org.szefu.Workers"/>
</session-factory>
</hibernate-configuration>
My TCP Port I changed for: 1433 (IP ALL) (it was 0 default in SQL Server Configuration Manager).
Thanks for any ideas