-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Reverse Engineering with Hibernate Tools and MSS SQL 2000 DB
PostPosted: Sat Sep 22, 2007 4:34 am 
Newbie

Joined: Sat Sep 22, 2007 4:04 am
Posts: 7
Hello,

i would like to use Hibernate Tools(HibernateTools-3.2.0.beta9a+Eclipse 3.2) for Reverse Code Generation from a MS SQL 2000 DB.
I have allready working the Reverse Code Generation with the DB but must change the schema to connect to. Here is my hibernate.properties file:
hibernate.connection.username=xxx
hibernate.connection.password=xxx
hibernate.connection.url=jdbc:microsoft:sqlserver://192.168.3.xxx:4433
hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.default_schema=db_cra

Code generation works until i do not set the default schema. But i connect to the wrong db_Schema named "master".
When the default_schema is set, the code Generation starts and keeps open, but nothing happens. Is this a bug?

Could somebody help me?

kind regards

martie


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 23, 2007 8:31 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
As we have lots of examples of success with reveng MS SQL I would suggest to review your configuration rather than conclude to early that its a bug.
Have you setup the ownership and access rights correctly for the user on that schema?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 24, 2007 3:01 am 
Newbie

Joined: Sat Sep 22, 2007 4:04 am
Posts: 7
Hello,
and thanks for your reply. It was not my intention to say that i have done everything right and hibernate has a bug.
Making a Connection to the schema with DriverManager.getConnection(...) works fine, so i supose that i do not have a problem with access rights. Maybe only a parameter is missing in my properties file from above. Seems like Hibernate begins to connect to the database and than hangs up.

I am not very experienced in using hibernate. Does anybody have some advice of how to get on with this problem?

kind regards

martie


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 25, 2007 7:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I am suddenly doing more sqlserver work at the moment so I will see if I have a moment to try it out. I do not expect to have a problem - normally its an issue in the JDBC driver connection or DB permissions. You might consider coding a small JDBC program to do a few database meta data operations to check the connections and data read by the JDBC connection string. Unfortunately, its hard to sort out remotely.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 3:09 am 
Newbie

Joined: Sat Sep 22, 2007 4:04 am
Posts: 7
Hello David,

after i got a tip from a colleague i have found my mistake. With this properties file it works:
hibernate.connection.username=xxx
hibernate.connection.password=xxx
hibernate.connection.url=jdbc:microsoft:sqlserver://192.168.3.xxx:4433
hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.default_schema=dbo
hibernate.databaseName=db_cra

Do you perhaps know who to look up for the schema with MSSQL Database Manger? Is there any other way to find out the schema? It would be interisting for me to know this for further projects.

kind regards

Martin


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 28, 2007 7:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You can find out all aspects from MS SQL Manager - see ownership, and the user, and dbname - its all there. Use this above DB and see the working details you can then see where they all link together.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.