Solved

SQL Server does not exist

Posted on 2010-09-09
17
315 Views
Last Modified: 2012-05-10
Good day

I'm trying to connect to a client's sql server db using visual basic 6.
He does not know much about computers, so it is very difficult to find out what the problem is.

I'v got a backup of his database and according to a 3rd party the username and password should be "sa" and the database is a sql server 2008 express, but they could be wrong.

When connecting to my own local pc (sql server 2008 express), using the following connection string, it is working.

"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=MyDB;Data Source=localhost\SQLEXPRESS","sa","sa"

When write a little test app to see if I can connect to his database, it take a long time and then I get the following error.

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access


I don't have access to his pc and I'm only able to email him test apps to see if I can establish a connection.

Any ideas?
0
Comment
Question by:koossa
  • 5
  • 4
  • 3
  • +3
17 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
please start debugging using this article:http://www.experts-exchange.com/A_1881.html
0
 
LVL 12

Expert Comment

by:GMGenius
Comment Utility
Sounds like either firewall or
The SQL has a different istance name to \SQLEXPRESS
If you open the services list and scroll down you will see the services for the SQL instances, name in brackets
eg
SQL Server (SQLEXPRESS)
SQL Server (MSSQLSERVER) <- This will tell you that its a default instance so no \ part eg you would just use localhost
0
 
LVL 13

Expert Comment

by:Surone1
Comment Utility
i believe by default sql server does not accept outside connections.
0
 
LVL 10

Expert Comment

by:3_S
Comment Utility
Surone1 is correct
See
http://technet.microsoft.com/en-us/library/ms190198.aspx
You need to enable network access first. Do you need help on how to enable access?
0
 
LVL 13

Expert Comment

by:Surone1
Comment Utility
also the password being "sa" would be very unwise..
any attack would crack that within minutes
0
 
LVL 12

Expert Comment

by:GMGenius
Comment Utility
The poster has stated that he is trying localhost, which will work by default
0
 
LVL 13

Expert Comment

by:Surone1
Comment Utility
or access denied..
coud the password be different?
0
 
LVL 13

Expert Comment

by:Surone1
Comment Utility
*could* the password be different?
there's some password recovery software around..
also try your local "sa" and windows administrator credentials
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 12

Expert Comment

by:GMGenius
Comment Utility
Your connection string looks odd
"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=MyDB;Data Source=localhost\SQLEXPRESS","sa","sa"

Try
Provider=SQLOLEDB.1;Data Source=(local)\SQLEXPRESS;User ID=sa;Password=sa;Initial Catalog=MyDB
0
 
LVL 24

Expert Comment

by:DBAduck - Ben Miller
Comment Utility
Remember that in SQL Express by default SQL Authentication is disabled by default.  Have you tried to use

Provider=SQLOLEDB.1;Data Source=localhost\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=MyDB

0
 

Author Comment

by:koossa
Comment Utility
Ok, I eventually discovered they have SQL Server 2000 RTM on their pc.
I'm currently connecting to localhost\sqlexpress on a sql server 2008 express.
What do I change this to for SQL Server 2000 RTM?
0
 
LVL 12

Expert Comment

by:GMGenius
Comment Utility
Check the services list as i suggested to see whats listed
It depends on if they installed it with an instance name or not
0
 

Author Comment

by:koossa
Comment Utility
I have asked the user to go to control panel, administrative tools, services and then look for SQL Server.
My sql server has (SQLEXPRESS) in brackets.
According to the user he only has an entry SQL Server Agent or SQL Server (Agent) or something like SQL Sever (SERVICEAGENT), difficult to find the exact name from him.

0
 
LVL 12

Expert Comment

by:GMGenius
Comment Utility
If you can , you could do a remote session with the person
Try a free product called Mikogo, I use it all the time and its very good
http://www.mikogo.com/
If there is nothing listed under SQL Server ( or Microsoft SQL... then the SQL database engine is not installed on that machine.
Are you certain it is on his machine?
0
 
LVL 24

Expert Comment

by:DBAduck - Ben Miller
Comment Utility
All he has to do is to go to Start | Programs | SQL Server 2005 (or whatever version) | Configuration Tools | SQL Confiugration Manager and it will show the SQL Servers and have the Instance name in ( instancename ) or if there is no instance name, then it is the default instance.
0
 

Accepted Solution

by:
koossa earned 0 total points
Comment Utility
The following connection string did the job.
I use the data source as a point (.) and it's working!


Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=.;Initial Catalog=AssetIT
0
 
LVL 24

Expert Comment

by:DBAduck - Ben Miller
Comment Utility
That means that it is using shared memory and that named pipes and tcpip are disabled which is the default.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

763 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

6 Experts available now in Live!

Get 1:1 Help Now