Solved

jdbc:sqlserver driver

Posted on 2012-04-05
2
403 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

808 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