Solved

jdbc:sqlserver driver

Posted on 2012-04-05
2
409 Views
Last Modified: 2012-04-06
hello:
I am trying to map a SQL server 2008r2:
and this is the convention I found on the net:

jdbc:sqlserver://server:port;DatabaseName=dbname

so I fill in:

jdbc:sqlserver://MyMachine\SQL Instance name:1433; XYZ=?????

The question is this:
DatabaseName=dbname - are not those the same (why would I put dbabasename=dbname)?

Is placing the IP of the machine better than  placing MyMachine\SQL Instance name ?


Thank you.
0
Comment
Question by:noamco36
2 Comments
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 37813061
If you are doing this from Java, you should "Request Attention" and get the Java zones added to your question.  They would be more familiar with the jdbc driver.  I believe that 'DatabaseName' is the name of the parameter and 'dbname' should be the name of your database.
0
 
LVL 24

Accepted Solution

by:
johanntagle earned 250 total points
ID: 37815065
I think you're mixing it up.   I believe you either use jdbc:sqlserver://[serverName[\instanceName]:port OR jdbc:sqlserver://server_ip_or_hostname:port;databaseName=dbname

databaseName is a parameter, and dbname is the value you give it i.e. databaseName=XYZ
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to shrink a transaction log file down to a reasonable size.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question