如何使用Hibernate Reverse Engineering向导在具有集成安全性的Microsoft SQL Server数据库中查找表?

时间:2015-11-02 21:57:18

标签: java sql-server hibernate netbeans

我想在我的Web应用程序项目中使用Hibernate Reverse Engineering Wizard。不幸的是,我无法连接到数据库(见下图),hibernate.cfg.xml设置为

<hibernate-configuration>
  <session-factory>
    <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
    <property name="hibernate.connection.url">jdbc:sqlserver://localhost\DATABACKEND:1433;databaseName=Example;integratedSecurity=true;</property>
    <property name="hibernate.default_schema">dbo</property>
  </session-factory>
</hibernate-configuration>

enter image description here

我可以使用URL连接字符串jdbc:sqlserver://localhost\DATABACKEND:1433;databaseName=Example;integratedSecurity=true;连接到服务资源管理器中没有任何问题的同一数据库,并将架构设置为dbo(参见下图)。

enter image description here

如果我在服务器上使用SQL身份验证,而不是集成的Windows身份验证,我也可以连接。但由于这不太安全,我宁愿使用集成身份验证,它在服务资源管理器中运行得很好(如上所示)。

我四处寻找帮助,但其他类似的问题(请参阅herehere)没有帮助的答案。我正在运行Netbeans 8.0.2,Microsoft SQL Server 2014和SQLJDBC 4.2。

0 个答案:

没有答案
相关问题