Solved

Cant get a DB connnection URL right

Posted on 2006-06-13
4
239 Views
Last Modified: 2008-03-10
Hi all,
I have an application which is connecting to a remote SQL SERVER database.
I originally developed the application and pointed it to my local SQL SERVER database using the following database url:
jdbc:microsoft:sqlserver://localhost:1433

I had a user set up in SQL server called coretestuser with a password.
In sql server this user was only asssociated with one database (DTTest) so SQL sever somehow worked out which database to use.

Now I have to use a different database on 10.0.0.5 and I cant connect to it.
I cant create a test user as the account I have been given is used on several databases!
I cant seem to get the database name working at all.

I ve tried:
url = "jdbc:microsoft:sqlserver://10.0.0.5:1433;Database=DTTest";

and

url = "jdbc:microsoft:sqlserver://10.0.0.5:1433/DTTest";

Neither is working I just get "Unable to connect.  Invalid URL"
Am i missing something really obvious??
Thanks
D
0
Comment
Question by:CoreSupport
  • 2
4 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 16895014
What do you get if you type:

    ping 10.0.0.5

on the command prompt?

10.* addresses are usually reserved for an internal network...I assume you are trying to run the client on the same network (ie: not externally on a different subnet?)

Tim
0
 
LVL 8

Expert Comment

by:colr__
ID: 16895023
Is you firewall setup to allow outbound requests on the sql server port? This is a very common problem with trying to connect to a remote DB, as these ports will be closed as standard.

The port is 1433 I think.

colr__
0
 
LVL 35

Accepted Solution

by:
TimYates earned 125 total points
ID: 16895033
Also, try:

    url = "jdbc:sqlserver://10.0.0.5;databaseName=DTTest" ;

Tim
0
 

Author Comment

by:CoreSupport
ID: 16895156
Brilliant guys!
url = "jdbc:sqlserver://10.0.0.5;databaseName=DTTest" ;

this worked!
that was wreckin my head all day! thanks!!
Legends!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Core java. Create the class with method that do logic for all elements of collection. 1 69
advertisement module in core php 4 145
Apps blocked by Java 9 64
table example 4 24
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now