Sql Server Express won't let me connect

D

David Thielen

Hi;

Our program installs Sql Server Express 2005 using the Sql Server
Express bootstrapper as part of the install. This installs a bare
bones version of Sql Server Express - no Sql Server Management Studio.

When our code tries to connect using the Sql Server ADO.NET connector
we get:

An error has occured while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL server does not allow remote
connections. (provider SQL Network Interfaces, error: 28 - Server
doesn't support requested protocol)

Running SQL Server Configuration Manager on the test raw install
computer vs on my computer (where it all works fine) - all the
settings are the same.

What do we have to do in the bootstrapper install so that it accepts
ADO.NET connections?

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
D

David Thielen

ps - Sql Server and the app are running on the same computer so it's
not a remote connection.


Hi;

Our program installs Sql Server Express 2005 using the Sql Server
Express bootstrapper as part of the install. This installs a bare
bones version of Sql Server Express - no Sql Server Management Studio.

When our code tries to connect using the Sql Server ADO.NET connector
we get:

An error has occured while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL server does not allow remote
connections. (provider SQL Network Interfaces, error: 28 - Server
doesn't support requested protocol)

Running SQL Server Configuration Manager on the test raw install
computer vs on my computer (where it all works fine) - all the
settings are the same.

What do we have to do in the bootstrapper install so that it accepts
ADO.NET connections?

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
D

David Thielen

We use the Sql Server ADO.NET, not OleDb (or ODBC). The connection
string is:

Data Source=BELLE\SQLEXPRESS;Initial Catalog=AutoTag;Integrated
Security=True

where BELLE is the name of my local machine.

??? - thanks - dave



How are you defining the connection string? That would be the first place to
check.

.\SQLEXPRESS denotes the default instance.

You can easily test database connectivity using a UDL file.
http://msdn.microsoft.com/en-us/library/aa140076(office.10).aspx

Regards,

Trevor Benedict
MCSD


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
T

Trevor Benedict

If you replace BELLE\SQLEXPRESS with .\SQLEXPRESS you should get it to work
I believe.

In your original post you mentioned that SQL Server Express 2005 would be
installed locally. If you point the connection to BELLE\SQLEXPRESS, the
application would try to connecto to your computer

Regards,

Trevor Benedict
MCSD
 
D

David Thielen

we tried .\sqlexpress and localhost\sqlexpress. We tried ODBC, OleDb,
and the SqlClient ADO.NET connectors. They all fail. Half the time
they fail with some kind of can't connect error and half the time they
fail with bad login.

As the bootstrapper installs Sql Server Express silently, we have to
use the integrated security login as there is no specific user
assigned rights during the install.

??? - thanks - dave


If you replace BELLE\SQLEXPRESS with .\SQLEXPRESS you should get it to work
I believe.

In your original post you mentioned that SQL Server Express 2005 would be
installed locally. If you point the connection to BELLE\SQLEXPRESS, the
application would try to connecto to your computer

Regards,

Trevor Benedict
MCSD


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
N

Norman Yuan

So, does your SQL Server Express install process (or script) do anything to
set up SQL Server login/database user? If not, does your application (Win
Form or Web app?) run under "admin" user account? If the box is Vista, even
local admin is not enough to access SQL Server 2005/Express.

Since you did mention you got "bad login" error, but did not mention how you
set up SQL Server's login/database user. It is almost impossible to use SQL
Server Express without configure SQL Server login/Database user/role, unless
you want all users are local admin (still, only pre-Vista OS).
 
T

Trevor Benedict

On the problematic machine, go to the command prompt and try this

osql -S .\SQLExpress -E

this will connect you to the default database, Master.

type the following command

Use AutoTag
Go

If the above works, this means your SQL Server is setup correctly and that
you have the AutoTag database.
 
D

David Thielen

Found it - very weird problem with virtual machines componded by the
get all Sql Servers on the net did not return the local machine.

thanks all - dave


we tried .\sqlexpress and localhost\sqlexpress. We tried ODBC, OleDb,
and the SqlClient ADO.NET connectors. They all fail. Half the time
they fail with some kind of can't connect error and half the time they
fail with bad login.

As the bootstrapper installs Sql Server Express silently, we have to
use the integrated security login as there is no specific user
assigned rights during the install.

??? - thanks - dave





david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top