aspose file tools*
The moose likes JDBC and the fly likes Connect Java to SQL Server database -- com.microsoft.sqlserver.jdbc.SQLServerException: Login failed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connect Java to SQL Server database -- com.microsoft.sqlserver.jdbc.SQLServerException: Login failed" Watch "Connect Java to SQL Server database -- com.microsoft.sqlserver.jdbc.SQLServerException: Login failed" New topic
Author

Connect Java to SQL Server database -- com.microsoft.sqlserver.jdbc.SQLServerException: Login failed

Gary Grubb
Greenhorn

Joined: Oct 07, 2010
Posts: 1
I am havine an issue connecting my Java code to a remote SQL Server database. I Googled for an answer to this issue, but the answer is always the same, i.e. wrong username & password. I am using this username & password connecting to the same remote database from a VB.NET program on the same server wothout issue.
I can also log in to this database with the same username and password as well.

There has got be be something I am missing. Here is the error message... there isn't anything particularly helpful in the rest of the error stack:

com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'omnireport'.


Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Did you see this discussion?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2516
    
  10

Hi Gary. Welcome to JavaRanch.

I have hidden the password and servername in your code. That server seems to be reachable from the internet.


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connect Java to SQL Server database -- com.microsoft.sqlserver.jdbc.SQLServerException: Login failed