Solved

Remote Access to MS SQL Express

Posted on 2011-03-08
3
366 Views
Last Modified: 2012-05-11
Here is my situation:

I am using software that requires a direct database connection to a DB on a hosted server running MS SQL Express 2005. By direct connection, I mean I need to be able to connect via ODBC as a DSN.

The server is a virtual server Windows Server 2003 hosted by a major national host. I've configured the DB to allow for remote connections. I also installed MS SQL Express on my remote machine. How exactly do I connect?

I try using the IP address\SQLEXPRESS and the SQL username/password but no luck. The windows firewall is not configured on the remote machine. Am I missing something here? I assumed that I would be able to connect and access all the tables of the DB just as if I was connected locally.

The error I receive is:

Cannot connect to xx.xx.xx.xx\SQLEXPRESS
Additional informaiton: Login failed for user 'xxxxxx' (Microsoft SQL Server, Error 18456)

Or, is there a better way to connect remotely so that I can establish an ODBC connection via DSB.

Thank you
0
Comment
Question by:youponder
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
devlab2012 earned 500 total points
ID: 35070954
Check that SQL Authentication is enabled. For this, on the remote server open sql express. Right click server node  > Properties > Security > select Sql Server and Windows Authentication.

Expand the Security node. Right click on Logins and create a new login.

Now, use the id/pwd of this newly created account.
0
 

Author Comment

by:youponder
ID: 35072863
That worked - thank you!

I was able to connect via ODBC. Only question is where do I specify the default database that ODBC should connect to.

I've done similar projects with MySQL where the MySQL ODBC driver clearly asks which database to log into. I can't seem to find that in windows.
0
 
LVL 13

Expert Comment

by:devlab2012
ID: 35078797
When you create a ODBC, there is an option of "Change the default database to". See the attached snapshot.
Capture.JPG
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 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