Reputation: 6209
I am trying to connect to a server instance of SQL Server 2010 that I installed recently using NetBeans. I have downloaded the latest JDBC driver for MS SQL Server, but I cannot get the right connection string to connect to this database. I think I am missing the following values in the connection:
'jdbc:sqlserver://'
Any help appreciated,
Ted
Upvotes: 1
Views: 9961
Reputation: 50
Port number should normally be 1433 for MSSQL, but often, this may not even be specified, so to do that you would need to:
The instance name is not necessary, it can be left blank.
Now for Username:
Note that what comes after // (jdbc:sqlserver://) is usually the host and not your username.
Go back into NetBeans and try to connect again. This time using Port 1433, nothing for Instance Name, username as 'sa' and password . Test the connection to ensure you get no errors. Good luck.
Upvotes: 2
Reputation: 2046
This should help:
http://netbeans.org/kb/docs/java/gui-db.html
Edit: As per comment below this was for derby stuff. Here is a more useful link but it's not got any information on supplying the DB username or password. It might be enough depending on your exact requirement.
Upvotes: 1