Link to home
Start Free TrialLog in
Avatar of koossa
koossa

asked on

SQL Server does not exist

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?
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

please start debugging using this article:https://www.experts-exchange.com/A_1881.html
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
i believe by default sql server does not accept outside connections.
Avatar of 3_S
3_S

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?
also the password being "sa" would be very unwise..
any attack would crack that within minutes
The poster has stated that he is trying localhost, which will work by default
or access denied..
coud the password be different?
*could* the password be different?
there's some password recovery software around..
also try your local "sa" and windows administrator credentials
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
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

Avatar of koossa

ASKER

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?
Check the services list as i suggested to see whats listed
It depends on if they installed it with an instance name or not
Avatar of koossa

ASKER

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.

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?
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.
ASKER CERTIFIED SOLUTION
Avatar of koossa
koossa

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That means that it is using shared memory and that named pipes and tcpip are disabled which is the default.