Question

So I'm working on a project using a SQL Server 2008 database. It uses Java with Hibernate. I was doing some work on it last week, it was working (relatively) fine. I came back to it today and all of the sudden Hibernate can't login or connect to the database. I suspect the problem is in SQL Server because I tried connecting to it with JDBC but that didn't work either.

Server authentication is set to "SQL Server and Windows Authentication mode"

my users "dummy" and "root" have "Grant" check on all explicit permissions.

The username and password I enter are correct. I know this because I can log in o SQL Server Management Studio with those logins and run queries.

The database is on a Windows XP virtual machine and I'm using Eclipse on my host machine. I have Port Forwarding and everything set up with Oracle VirtualBox (like I said, it was working fine last week).

Any suggestions?

--EDIT--
See the comments below the original post

---EDIT---
I made a discovery. My Java project is not even getting connected with the SQL Server. When I fail a log in with a .udl test, a log message is created for the failed login. But whenever I fail to login using my Java project on my host machine, there are logs created.
I should also point out that I can connect to a MySQL database running on the same VM and run queries on it just fine.
Is there something wrong with this URL String? "jdbc:sqlserver://192.168.56.1:1433;databaseName=MLB;user=dummy;password=123"
I can confirm that the IP Address, Port number, database name, username, and password are all correct.

Était-ce utile?

La solution

I figured out the answer myself. I had install SQL Server 2014 on my host machine and somehow that conflicted with some settings somewhere. Once I unistalled SQL Server 2014 from my host machine all of my problems went away.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top