Connecting to a VPN Database

  • Thread starter Thread starter kohl.mike
  • Start date Start date
K

kohl.mike

I've been having an on going problem.

About 6 months ago I was given a huge project at work, and one of the
tasks was to restucture an existing database, which contains around
50+ Sql Tables. The new Database is on the sql server at work.

To make a long story short, the company I work for, is going to
outsource the project to me and I will be working on it from home in
my spare time.

The problem is, the database is on the server at work, and I can not
connect to the database.

The project Im working on is in vs2008, the language I am using is C#,
and The sql server i believe is 2005. My employer gave me the
information to set up a VPN.

Now the strange thing is if i can add a connection to the database
explorer in visual studio and access the database from there, the
problem that I am having is thru the connection string within in the
application.

The following is the original SQL connection string that I use when im
at work:

public static string connectionString = "Data Source=xxxxx;Initial
Catalog=xxxx;Integrated Security=True;Pooling=False";


After connection to the database in the database explore and I click
on the properties for that database, the following is the connection
string that I get:

Data Source=11.0.11.11,1234;Initial Catalog=xxxx;User
ID=xxxx;Password=***********

notice on the datasource their is a comma, 1234. I believe this is
the open port, and also notice how the password has *****.


Does anyone know what I need to do to connect to this database? Is it
just a setting on the server that needs modified? I have told my
employer in the past of my problem, several times, and basically they
just say i should be able to connect to it.. and they don't seem to
know what the problem is.
 
The difference of the two ConnecctionString is one uses Windows Integrated
security, the other you was given uses SQL Server security. As long as the
ConnectionStringare correct according to the SQL Server configuration, you
should be able to connect, whether you connect to it directly from internal
network LAN or from VPN (if you can log into the VPN correctly). However,
use Port 1234 is unusual. Default port for SQL Server is 1433. Although it
can be configured to use any port, such as 1234, but usually, there is no
need to change the default port.

One thing I suggest is to do your development work in local SQL Server
instance, rather than connect to a remote one. If the remote one is
production SQL Server, you should not connect your Visual Studio to it at
all. Just get a developer edition of SQL Server2005/8 ($50) and install it
on your computer, then get a backup of your targeting database and restore
to your computer, off you go. Once your development is done and tested, you
can update your changes back to the production SQL Server in proper way.
 
Back
Top