Showing posts with label connecting. Show all posts
Showing posts with label connecting. Show all posts

Friday, March 9, 2012

Error Connection to MSDE with SQL JDBC Driver

Connecting to SQL Server with SQL Server Driver for JDBC is OK. Trying to connect to same database, installed under MSDE, i get error "Error establishing socket".
It looks like the JDBC Driver only supports full SQL Server 2000 and not MSDE?D, What JDBC driver are you using?
If the driver you are using supported only TCP connection, make sure that TCP is enabled on the server side for MSDE.

Error connecting to the sqlserver express edition from visual web developer 2005

hello eveyone..

i have just downloaded and installed the visaul web developer 2005 express edition and sqlserver 2005 express edition.On top of that i even downloaded and installed the northwind database.But my problem is when i am connecting to the northwind database by clicking toos menu>connect to the database>choose datasource>new connection>..i have provided it with the required information..but as soon as i press "Test Connection" button the following error box displays..

"an error has occured while establishing a connection to the server.when connecting to the
sql server2005,this failure may be caused by the fact that under default settings sql server
doestnot allow remote connections.(provider:Named piped providers,error:40-couldnot open a
connection to sqlserver.)"

i have no idea whats is all about..can anyone get me pass this error..

yea that error is pretty bogus in that it will show that for all kinds of problems even if they have nothing to do with remote connections...and im not trying to be insulting but did you for sure actually start the server itself or did you just try and do everything through the visual studio? I have set up a connection before through visual studio and had no problems...can you provide some more info? -- jp

|||

Hi

From your description, it seems that you met error when you are trying to connect to your SQLExpress,right?

This is a generally error message. To diagnose the issue, you may following the steps below.

First, you also should make sure that if 1433 port has been enabled on your server, which is the default port for SQLServer remote connections.

Generally, you can try the following ways to handle your problem.

1. Enable remote connections for SQL Server 2005 Express or SQL Server 2005 Developer Edition
2. Enable the SQL Server Browser service
3. Create exceptions in Windows Firewall
4. Create an exception for SQL Server 2005 in Windows Firewall

More details for each step, you may see the following link:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277 (Also suitable for SQLExpress)

Thanks.

Error connecting to the server

I am having a problem adding a new server or going into my previously registered servers.

I was using Sql express and now using the full version of SQL 2005.

When I try to coonect to a server, In the server type I choose Database Engine
Server name I typed in LOCALHOST\SQLEXPRESS, no names show in the
dropdown for server, leave use windows authentication selected. then hit the
advanced button and change the network library to shared memory, hit test
button and get this error:

"An error has occurred 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: shared memory provider, error: 36 - the shared memory dll used to
to connect to 2000 was not found)"

any input would be appreciated. thanks.

Are you connecting to the Remote server or a Local server?|||local server|||
<connectionStrings><add name="ConnectionString" connectionString="Data Source=.\SQLSERVER;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient" /></connectionStrings>

SQLSERVER is the server Name of your SQL SERVER. Check the name of the server (by default its SQLSERVER)

OR (create a new connection string)

Create a new Page > Put a GridView on it > Click the right Top corner and select the "New data source" > Click "Database" in the step "Choose a Data Type > Click OK > Now when you click the Drop down, probably you will see your Data base name in it.

(you will see the database name with your connection strings when the connection strings in web.config are not valid)

1. If you see the Database name:

Click Next and select any Table from your Database> Click Next again Ok > Click Finish. Now when you open your Configuration File (i.e web.config) you will see a new Connection string with the server Name.

2. If you dont see the Database Name:

Click "New Connection" in the step "Choose your data Connection" > Choose "Microsoft SQL Server" type and click Continue > choose your SQL SERVER Name from the Drop down next to REFRESH button> Attach the DataBase to the server > Now you can create a Connection string to the server.

Happy coding!

|||

I cannot register a server in sql server Management Studio

and this is the error i get

New Server Registration

Testing the registered server failed. Verify the server name, login credentials, and database, and then click test again.

Additional Information

=>An error has occurred 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: 26 - Error Locating Server/Instance Specified)(Microsoft Sql Server)

|||

Hi,

Please check if you have the correct Servername and Instance name of that specific server.

I suggest you create a .UDL file to test the connection with the following steps:

1. Create a normal Text file.
2. Rename it to .udl extension.
3. Double click on that file and a Data Link Properties dialog box will be show.
4. Select the provider and data source, specify username and password, and click the Test Connection button for test.

|||

When I Have Microsoft OLE DB Provider for OLAP Drivers, it returns these options in the data source name

dBASE Files|||

Hi,

Are you connecting to a OLAP service(like SQL Server analysis service)? If not, I would suggest you use OLE DB Provider for SQL Server or SQL Native Client instead.

You can choose them from the Provider tab in Data Link Properties dialog box.

Error connecting to Sybase Linked Server

I am getting the following error when querying a linked server:
Msg 7403, Level 16, State 1, Line 3
The OLE DB provider "Sybase.ASEOLEDBProvider" has not been registered.
The query is as follows:
select * from syb_Link.Comp.dbo.Users
How did you create the linked server -
Locally on the sql box or remotely from your desktop?
Sounds to me like the server doesnt have a sybase client.
"Ziggy" wrote:

> I am getting the following error when querying a linked server:
> Msg 7403, Level 16, State 1, Line 3
> The OLE DB provider "Sybase.ASEOLEDBProvider" has not been registered.
> The query is as follows:
> select * from syb_Link.Comp.dbo.Users

Error connecting to Sybase Linked Server

I am getting the following error when querying a linked server:
Msg 7403, Level 16, State 1, Line 3
The OLE DB provider "Sybase.ASEOLEDBProvider" has not been registered.
The query is as follows:
select * from syb_Link.Comp.dbo.UsersHow did you create the linked server -
Locally on the sql box or remotely from your desktop?
Sounds to me like the server doesnt have a sybase client.
"Ziggy" wrote:

> I am getting the following error when querying a linked server:
> Msg 7403, Level 16, State 1, Line 3
> The OLE DB provider "Sybase.ASEOLEDBProvider" has not been registered.
> The query is as follows:
> select * from syb_Link.Comp.dbo.Users

Error connecting to SQLExpress 2005 locally

Hello,
I'm a newbie here and was wondering anyone could help me with this.
I have a simple ASP.NET 2 web application running perfectly fine with
IIS and SQLServerExpress installed locally on my WinXP as a testing
server (I created the app in Visual Studio.NET 2005).
When deploying this app on the production server (running Win2000
Server, IIS and SQLServerExpress 2005), I'm getting the following
message when calling an aspx data-bound page from a browser:
An error has occurred 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: 26 - Error
Locating Server/Instance Specified)
On the production server, I have the SQLServerExpress installed locally
on C: drive and the database is located on D: drive (on the same
directory as the app).
Connection string used in the webconfig file:
connectionString=" Server=SERVERNAME\SQLEXPRESS;AttachDbFil
ename=D:\Inetpub\A
pp_Data\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
providerName="System.Data.SqlClient"
Does anyone know how to solve this issue? Any help would be greatly
appreciated.
Thanks,
HarryHi
Have you checked if you are allowing remote connections on your SQL Express
installation, by default these will be switched off.
Check the Remote Connections setting the the SQL Server 2005 Surface Aread
Configuration tool.
John
"hko" wrote:

> Hello,
> I'm a newbie here and was wondering anyone could help me with this.
> I have a simple ASP.NET 2 web application running perfectly fine with
> IIS and SQLServerExpress installed locally on my WinXP as a testing
> server (I created the app in Visual Studio.NET 2005).
> When deploying this app on the production server (running Win2000
> Server, IIS and SQLServerExpress 2005), I'm getting the following
> message when calling an aspx data-bound page from a browser:
> An error has occurred 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: 26 - Error
> Locating Server/Instance Specified)
> On the production server, I have the SQLServerExpress installed locally
> on C: drive and the database is located on D: drive (on the same
> directory as the app).
> Connection string used in the webconfig file:
> connectionString=" Server=SERVERNAME\SQLEXPRESS;AttachDbFil
ename=D:\Inetpub
\App_Data\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
> providerName="System.Data.SqlClient"
> Does anyone know how to solve this issue? Any help would be greatly
> appreciated.
> Thanks,
> Harry|||Hi John,
I did allow remote connections eventhough my database is on the same machine
as my web app, but no luck so far.
I used windows authentication for the database, and login to the machine
using admin account.
Another thing that I noticed is that when I go to SQL Server Configuration
Manager, under SQL Server 2005 Network Configuration, it says Protocols for
MSSQLSERVER, whereas on my dev machine it says SQLEXPRESS. When upgrading
from MSDE to SQLExpress i just chose the default instance name, but somehow
it's saying MSSQLSERVER.
I checked the databaseconnection through SQL Management Studio Express and
it works fine. Only when viewing the data-bound page on a browser that I get
the error message.
Do you think I should try to uninstall SQLServer Express and reinstall?
hko
"John Bell" wrote:
> Hi
> Have you checked if you are allowing remote connections on your SQL Expres
s
> installation, by default these will be switched off.
> Check the Remote Connections setting the the SQL Server 2005 Surface Aread
> Configuration tool.
> John
> "hko" wrote:
>|||Hi
If this is the default instance then change your connection string to only
be the servername.
If you want to change the installation from being the default instance you
will need to re-install.
John
"hko" wrote:
> Hi John,
> I did allow remote connections eventhough my database is on the same machi
ne
> as my web app, but no luck so far.
> I used windows authentication for the database, and login to the machine
> using admin account.
> Another thing that I noticed is that when I go to SQL Server Configuration
> Manager, under SQL Server 2005 Network Configuration, it says Protocols fo
r
> MSSQLSERVER, whereas on my dev machine it says SQLEXPRESS. When upgrading
> from MSDE to SQLExpress i just chose the default instance name, but someho
w
> it's saying MSSQLSERVER.
> I checked the databaseconnection through SQL Management Studio Express and
> it works fine. Only when viewing the data-bound page on a browser that I g
et
> the error message.
> Do you think I should try to uninstall SQLServer Express and reinstall?
> hko
> "John Bell" wrote:
>|||I only have one instance and that is the default instance, and this is my
connection string:
connectionString=" Server=HOMER\SQLEXPRESS;AttachDbFilename
=D:\Inetpub\App_Da
ta\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
providerName="System.Data.SqlClient"
Still something isn't right. Do you think I should probably re-install and
do fresh installation of SQL Express instead of upgrading (like what I did)?
"John Bell" wrote:
> Hi
> If this is the default instance then change your connection string to only
> be the servername.
> If you want to change the installation from being the default instance you
> will need to re-install.
> John
>
> "hko" wrote:
>|||Hi
Try the connection string:
connectionString=" Server=HOMER;AttachDbFilename=D:\Inetpub
\App_Data\registra
tion. mdf;Database=registration;Trusted_Connec
tion=yes;"
providerName="System.Data.SqlClient"
If you want a names instance then you would have to re-install and say that
you want a named instance and not the default instance.
John
"hko" wrote:
> I only have one instance and that is the default instance, and this is my
> connection string:
> connectionString=" Server=HOMER\SQLEXPRESS;AttachDbFilename
=D:\Inetpub\App_
Data\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
> providerName="System.Data.SqlClient"
> Still something isn't right. Do you think I should probably re-install and
> do fresh installation of SQL Express instead of upgrading (like what I did
)?
> "John Bell" wrote:
>|||Still not working. I tried different combination of connection strings but
kept getting the same error message.
I just want to use the default instance since there's only one database on
the machine.
I suspect there's a glitch during the upgrade process which causes SQL
server to locate the default instance. I was able to connect ok using
Management Studio Express.
This is the most frustrating thing ever to deal with...
"John Bell" wrote:
> Hi
> Try the connection string:
> connectionString=" Server=HOMER;AttachDbFilename=D:\Inetpub
\App_Data\regist
ration. mdf;Database=registration;Trusted_Connec
tion=yes;"
> providerName="System.Data.SqlClient"
> If you want a names instance then you would have to re-install and say tha
t
> you want a named instance and not the default instance.
> John
> "hko" wrote:
>|||Hi
A couple of suggestions:
Try using osql to try and connect, use both the server name and the IP
address and different user combinations.
Check that there is no blocking of the ports being used by a firewall (Try
telneting to the port!)
John
"hko" wrote:
> Still not working. I tried different combination of connection strings but
> kept getting the same error message.
> I just want to use the default instance since there's only one database on
> the machine.
> I suspect there's a glitch during the upgrade process which causes SQL
> server to locate the default instance. I was able to connect ok using
> Management Studio Express.
> This is the most frustrating thing ever to deal with...
> "John Bell" wrote:
>

Error connecting to SQL Server 2005 Express from Access

I am trying to connect to SQL Server 2005 Express from Access using a
DSN-less connection string, but I keep encountering errors. What happens is
that I have a login form with 2 text boxes for users to enter their username
and password. When they have entered them, they click OK and Access tries to
connect using the connection string below.
After waiting a while I get an error, however the SQL Server Login box
appears and I am able to login using my sa login. So, since I know I can
connect to SQL Server, I think the problem must be with my connection string:
stConnect = "ODBC;DRIVER={SQL Native Client}" _
& ";Trusted_Connection=no" _
& ";SERVER=CHRIS\SQLEXPRESS" _
& ";Address=10.0.0.17,1433" _
& ";Network=DBMSSOCN" _
& ";DATABASE=authorDB 2005_11_11SQL" _
& ";UID=" & stUID _
& ";PWD=" & stPWD & ";"
These are the error messages I get when I try to connect:
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]TCP Provider: No connection could be made
because the target machine actively refused it.
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]An error has occurred 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.
Connection failed:
SQLState: 'S1T00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
I should mention that I was able to use a similar connection string to
connect to an MSDE instance with no problems, so if need be I can just use
MSDE. Still, I would prefer to use SQL Server Express since it doesn't have
a workload governor. Also, this is on my local machine, so there shouldn't
be any network issues.
I would appreciate any assistance that anyone can offer.
Thanks,
Chris
By default SQL Express does not accept remote connections over TCP or Named
Pipes, you need to enable that explicitly.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>I am trying to connect to SQL Server 2005 Express from Access using a
> DSN-less connection string, but I keep encountering errors. What happens
> is
> that I have a login form with 2 text boxes for users to enter their
> username
> and password. When they have entered them, they click OK and Access tries
> to
> connect using the connection string below.
> After waiting a while I get an error, however the SQL Server Login box
> appears and I am able to login using my sa login. So, since I know I can
> connect to SQL Server, I think the problem must be with my connection
> string:
> stConnect = "ODBC;DRIVER={SQL Native Client}" _
> & ";Trusted_Connection=no" _
> & ";SERVER=CHRIS\SQLEXPRESS" _
> & ";Address=10.0.0.17,1433" _
> & ";Network=DBMSSOCN" _
> & ";DATABASE=authorDB 2005_11_11SQL" _
> & ";UID=" & stUID _
> & ";PWD=" & stPWD & ";"
> These are the error messages I get when I try to connect:
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]TCP Provider: No connection could be made
> because the target machine actively refused it.
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]An error has occurred 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.
> Connection failed:
> SQLState: 'S1T00'
> SQL Server Error: 0
> [Microsoft][SQL Native Client]Login timeout expired
>
> I should mention that I was able to use a similar connection string to
> connect to an MSDE instance with no problems, so if need be I can just use
> MSDE. Still, I would prefer to use SQL Server Express since it doesn't
> have
> a workload governor. Also, this is on my local machine, so there
> shouldn't
> be any network issues.
> I would appreciate any assistance that anyone can offer.
> Thanks,
> Chris
|||Gert, I know that. I started the Browser and enabled TCP/IP. Like I said, I
can connect using the sa login, and techinically it's not a remote connection
as it's on a local machine. Thanks for the response, but I already checked
and that isn't the problem.
-Chris
"Gert E.R. Drapers" wrote:

> By default SQL Express does not accept remote connections over TCP or Named
> Pipes, you need to enable that explicitly.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2005 All rights reserved.
> "Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
> news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>
>
|||I figured it out. I just needed to change the default port for TCP/IP since
MSDE was using port 1433.
-Chris
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:BD09DFBD-66E6-411D-AA16-2A89D9672C1B@.microsoft.com...[vbcol=seagreen]
> Gert, I know that. I started the Browser and enabled TCP/IP. Like I
> said, I
> can connect using the sa login, and techinically it's not a remote
> connection
> as it's on a local machine. Thanks for the response, but I already
> checked
> and that isn't the problem.
> -Chris
> "Gert E.R. Drapers" wrote:

Error connecting to SQL Server 2005 Express from Access

I am trying to connect to SQL Server 2005 Express from Access using a
DSN-less connection string, but I keep encountering errors. What happens is
that I have a login form with 2 text boxes for users to enter their username
and password. When they have entered them, they click OK and Access tries to
connect using the connection string below.
After waiting a while I get an error, however the SQL Server Login box
appears and I am able to login using my sa login. So, since I know I can
connect to SQL Server, I think the problem must be with my connection string:
stConnect = "ODBC;DRIVER={SQL Native Client}" _
& ";Trusted_Connection=no" _
& ";SERVER=CHRIS\SQLEXPRESS" _
& ";Address=10.0.0.17,1433" _
& ";Network=DBMSSOCN" _
& ";DATABASE=authorDB 2005_11_11SQL" _
& ";UID=" & stUID _
& ";PWD=" & stPWD & ";"
These are the error messages I get when I try to connect:
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]TCP Provider: No connection could be made
because the target machine actively refused it.
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]An error has occurred 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.
Connection failed:
SQLState: 'S1T00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
I should mention that I was able to use a similar connection string to
connect to an MSDE instance with no problems, so if need be I can just use
MSDE. Still, I would prefer to use SQL Server Express since it doesn't have
a workload governor. Also, this is on my local machine, so there shouldn't
be any network issues.
I would appreciate any assistance that anyone can offer.
Thanks,
Chris
By default SQL Express does not accept remote connections over TCP or Named
Pipes, you need to enable that explicitly.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>I am trying to connect to SQL Server 2005 Express from Access using a
> DSN-less connection string, but I keep encountering errors. What happens
> is
> that I have a login form with 2 text boxes for users to enter their
> username
> and password. When they have entered them, they click OK and Access tries
> to
> connect using the connection string below.
> After waiting a while I get an error, however the SQL Server Login box
> appears and I am able to login using my sa login. So, since I know I can
> connect to SQL Server, I think the problem must be with my connection
> string:
> stConnect = "ODBC;DRIVER={SQL Native Client}" _
> & ";Trusted_Connection=no" _
> & ";SERVER=CHRIS\SQLEXPRESS" _
> & ";Address=10.0.0.17,1433" _
> & ";Network=DBMSSOCN" _
> & ";DATABASE=authorDB 2005_11_11SQL" _
> & ";UID=" & stUID _
> & ";PWD=" & stPWD & ";"
> These are the error messages I get when I try to connect:
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]TCP Provider: No connection could be made
> because the target machine actively refused it.
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]An error has occurred 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.
> Connection failed:
> SQLState: 'S1T00'
> SQL Server Error: 0
> [Microsoft][SQL Native Client]Login timeout expired
>
> I should mention that I was able to use a similar connection string to
> connect to an MSDE instance with no problems, so if need be I can just use
> MSDE. Still, I would prefer to use SQL Server Express since it doesn't
> have
> a workload governor. Also, this is on my local machine, so there
> shouldn't
> be any network issues.
> I would appreciate any assistance that anyone can offer.
> Thanks,
> Chris
|||Gert, I know that. I started the Browser and enabled TCP/IP. Like I said, I
can connect using the sa login, and techinically it's not a remote connection
as it's on a local machine. Thanks for the response, but I already checked
and that isn't the problem.
-Chris
"Gert E.R. Drapers" wrote:

> By default SQL Express does not accept remote connections over TCP or Named
> Pipes, you need to enable that explicitly.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2005 All rights reserved.
> "Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
> news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>
>
|||I figured it out. I just needed to change the default port for TCP/IP since
MSDE was using port 1433.
-Chris
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:BD09DFBD-66E6-411D-AA16-2A89D9672C1B@.microsoft.com...[vbcol=seagreen]
> Gert, I know that. I started the Browser and enabled TCP/IP. Like I
> said, I
> can connect using the sa login, and techinically it's not a remote
> connection
> as it's on a local machine. Thanks for the response, but I already
> checked
> and that isn't the problem.
> -Chris
> "Gert E.R. Drapers" wrote:

Error connecting to SQL Server 2005 Express from Access

I am trying to connect to SQL Server 2005 Express from Access using a
DSN-less connection string, but I keep encountering errors. What happens is
that I have a login form with 2 text boxes for users to enter their username
and password. When they have entered them, they click OK and Access tries t
o
connect using the connection string below.
After waiting a while I get an error, however the SQL Server Login box
appears and I am able to login using my sa login. So, since I know I can
connect to SQL Server, I think the problem must be with my connection string
:
stConnect = "ODBC;DRIVER={SQL Native Client}" _
& ";Trusted_Connection=no" _
& ";SERVER=CHRIS\SQLEXPRESS" _
& ";Address=10.0.0.17,1433" _
& ";Network=DBMSSOCN" _
& ";DATABASE=authorDB 2005_11_11SQL" _
& ";UID=" & stUID _
& ";PWD=" & stPWD & ";"
These are the error messages I get when I try to connect:
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]TCP Provider: No connection could be m
ade
because the target machine actively refused it.
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]An error has occurred while establishi
ng 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 no
t
allow remote connections.
Connection failed:
SQLState: 'S1T00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
I should mention that I was able to use a similar connection string to
connect to an MSDE instance with no problems, so if need be I can just use
MSDE. Still, I would prefer to use SQL Server Express since it doesn't have
a workload governor. Also, this is on my local machine, so there shouldn't
be any network issues.
I would appreciate any assistance that anyone can offer.
Thanks,
ChrisBy default SQL Express does not accept remote connections over TCP or Named
Pipes, you need to enable that explicitly.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>I am trying to connect to SQL Server 2005 Express from Access using a
> DSN-less connection string, but I keep encountering errors. What happens
> is
> that I have a login form with 2 text boxes for users to enter their
> username
> and password. When they have entered them, they click OK and Access tries
> to
> connect using the connection string below.
> After waiting a while I get an error, however the SQL Server Login box
> appears and I am able to login using my sa login. So, since I know I can
> connect to SQL Server, I think the problem must be with my connection
> string:
> stConnect = "ODBC;DRIVER={SQL Native Client}" _
> & ";Trusted_Connection=no" _
> & ";SERVER=CHRIS\SQLEXPRESS" _
> & ";Address=10.0.0.17,1433" _
> & ";Network=DBMSSOCN" _
> & ";DATABASE=authorDB 2005_11_11SQL" _
> & ";UID=" & stUID _
> & ";PWD=" & stPWD & ";"
> These are the error messages I get when I try to connect:
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]TCP Provider: No connection could be
made
> because the target machine actively refused it.
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]An error has occurred while establis
hing 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.
> Connection failed:
> SQLState: 'S1T00'
> SQL Server Error: 0
> [Microsoft][SQL Native Client]Login timeout expired
>
> I should mention that I was able to use a similar connection string to
> connect to an MSDE instance with no problems, so if need be I can just use
> MSDE. Still, I would prefer to use SQL Server Express since it doesn't
> have
> a workload governor. Also, this is on my local machine, so there
> shouldn't
> be any network issues.
> I would appreciate any assistance that anyone can offer.
> Thanks,
> Chris|||Gert, I know that. I started the Browser and enabled TCP/IP. Like I said,
I
can connect using the sa login, and techinically it's not a remote connectio
n
as it's on a local machine. Thanks for the response, but I already checked
and that isn't the problem.
-Chris
"Gert E.R. Drapers" wrote:

> By default SQL Express does not accept remote connections over TCP or Name
d
> Pipes, you need to enable that explicitly.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2005 All rights reserved.
> "Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in messag
e
> news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>
>|||I figured it out. I just needed to change the default port for TCP/IP since
MSDE was using port 1433.
-Chris
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:BD09DFBD-66E6-411D-AA16-2A89D9672C1B@.microsoft.com...[vbcol=seagreen]
> Gert, I know that. I started the Browser and enabled TCP/IP. Like I
> said, I
> can connect using the sa login, and techinically it's not a remote
> connection
> as it's on a local machine. Thanks for the response, but I already
> checked
> and that isn't the problem.
> -Chris
> "Gert E.R. Drapers" wrote:
>

Error connecting to sql server 2005 express

Just manged to install sql server 2005 express after two days. I have a problem now! When i try to connect to it via my browser (local database), i get the following error:

An error has occurred 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

I have opened the surface area configuration manager and set the connections to remote and local but it still doesnt work

Any ideas would be great

Paul

I experienced the same problem when I tried to connect to the database via "Add new connection",
but when I entered the path as localhost\sqlexpress, it worked. So you could try the same.

Hope that helps.|||

You are right. thanks a lot

Cheers

Error connecting to SQL Server 2005 - ... does not allow remote connections?

I have an ASP.NET 2.0 Website that in the connection string does not connect
to the local SQL Server but tries to connect to another SQL Server 2005
Server in another State. When I run the application from Visual Studio 2005
it connects just fine. When I published the website to the Live Server I
receive the below error:
An error has occurred 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.
Any ideas?
Peace in Christ
Marco Napoli
http://www.ourlovingmother.orgCheck this url for troubleshooting:
http://blogs.msdn.com/sql_protocols.../22/506607.aspx
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"Marco Napoli" <marco@.avantitecnospam.com> wrote in message
news:#14p4JoaGHA.5004@.TK2MSFTNGP02.phx.gbl...
> I have an ASP.NET 2.0 Website that in the connection string does not
connect
> to the local SQL Server but tries to connect to another SQL Server 2005
> Server in another State. When I run the application from Visual Studio
2005
> it connects just fine. When I published the website to the Live Server I
> receive the below error:
> An error has occurred 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.
> Any ideas?
> --
> Peace in Christ
> Marco Napoli
> http://www.ourlovingmother.org
>
>|||Thank you.
Marco
"Jack Vamvas" <delete_this_bit_jack@.ciquery.com_delete> wrote in message
news:euqdnWInVNe2O8zZRVnyjg@.bt.com...
> Check this url for troubleshooting:
> http://blogs.msdn.com/sql_protocols.../22/506607.aspx
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
> ___________________________________
>
> "Marco Napoli" <marco@.avantitecnospam.com> wrote in message
> news:#14p4JoaGHA.5004@.TK2MSFTNGP02.phx.gbl...
> connect
> 2005
>

Error connecting to SQL server

Hi,

We have a Windows 2000 terminal server with service pack 4 loaded.This has siebel application 7.8.2 .

We have another Windows 2003 standard edition server with service pack 1. This has SQL 2000 server with Service pack 4 installed.

When trying to connect to the sql server through odbc , i get an error


Microsoft SQL Server Login

Connection failed:
SQLState: '01000'
SQL Server Error: 10061
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.


OK

-I am able to ping the server and viceversa.

Please let me know how to resolve this problem

Then you either have a different port than 1433 (you will have to specify the portnumber after the instance / servername with the syntax --> default instance Servername,Portnumber ; Servername\InstanceName,Portnumber for named instances). Do you have a firewall installed ? Then you will have to check if the appropiate port for SQL are enabled.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de|||

Please follow the instruction and give us more details:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1

|||

Hi

The port is configured to 1433

There is no firewall installed

does it happen due to ODBC version.?

|||

the issue is most likely that you are using terminal server and the odbc is a user odbc, and not a system odbc. if system odbc has not been created for the connection that is having the issue, create it.

ping uses icmp, and not always best test. test the odbc, recreate it if necessary. to check the 1433 port, open telnet client and type in telnet:1433; if it opens, the port is open, otherwise you know it's closed.

also check that the db is using the 1433 port (could have been configured to use alternate).

btw- i don't think siebel 7.8.2 is supported on 2000 server

Error connecting to SQL server

Hi,

We have a Windows 2000 terminal server with service pack 4 loaded.This has siebel application 7.8.2 .

We have another Windows 2003 standard edition server with service pack 1. This has SQL 2000 server with Service pack 4 installed.

When trying to connect to the sql server through odbc , i get an error


Microsoft SQL Server Login

Connection failed:
SQLState: '01000'
SQL Server Error: 10061
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.


OK

-I am able to ping the server and viceversa.

Please let me know how to resolve this problem

Then you either have a different port than 1433 (you will have to specify the portnumber after the instance / servername with the syntax --> default instance Servername,Portnumber ; Servername\InstanceName,Portnumber for named instances). Do you have a firewall installed ? Then you will have to check if the appropiate port for SQL are enabled.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de
|||

Please follow the instruction and give us more details:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1

|||

Hi

The port is configured to 1433

There is no firewall installed

does it happen due to ODBC version.?

|||

the issue is most likely that you are using terminal server and the odbc is a user odbc, and not a system odbc. if system odbc has not been created for the connection that is having the issue, create it.

ping uses icmp, and not always best test. test the odbc, recreate it if necessary. to check the 1433 port, open telnet client and type in telnet:1433; if it opens, the port is open, otherwise you know it's closed.

also check that the db is using the 1433 port (could have been configured to use alternate).

btw- i don't think siebel 7.8.2 is supported on 2000 server

Error connecting to sql server

I have a perplexing problem. I've developed an ASP application for our internal business use. I'm getting ready to launch, but every once in a while the application can't connect to the database. The error I get is:

An error has occurred 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

We (IT and I) turned off the remote connections and it still happens. I'm afraid of launching without understanding what causes this and gettign a fix. To get it working again, we restart IIS and it works fine. I used VWD 2005 Express and it's running on SQL Server 2005 Express.

Thanks for any help you may have.
Scott J.

Don't let the bit about "does not allow remote connections" send you down the wrong path - this ridiculous error message is posted regardless of the actual problem (one of Microsoft's worst error messages).

The part to concentrate on is the final part of the error message, which differs depending on the actual error - in your case error: 40 - Could not open a connection to SQL Server. Are you sure that the SQL Express instance is actually running when you get this problem (is it periodically stopping?). Check it via the services applet - restarting IIS may simply be restarting the Express instance.

Error connecting to SQL from within same machine

I am trying to move my SharePoint db's from on drive on a SQL Server to
another. Apparently, This cannot be done with the Management Tool and must
be done with the sqlcmd.
The first comand needed is: >sqlcmd -S
\\.\pipe\mssql$microsoft##ssee\sql\query -E
This yields the follwoing error:
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
establi
shing a connection to the server. When connecting to SQL Server 2005, this
failu
re may be caused by the fact that under the default settings SQL Server does
not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
TCP, Named Pipes and Shared Memory are enabled and configuration allows for
remote connection (even thought this local)
I have tried to modify the command with the specific instance and
server\instance all result in the same error.
I am at a loss as what to do to move these db's
Can anyone help with this issue.
Thanks,
Mike Altman
Hello Mike,
Do not use sqlcmd. Just stop your SharePoint services. Detach your databases
using Management Studio, go to the operating system and move all your
database files to the new drive and then attach your databases using
Management Studio again.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"travldc" wrote:

> I am trying to move my SharePoint db's from on drive on a SQL Server to
> another. Apparently, This cannot be done with the Management Tool and must
> be done with the sqlcmd.
> The first comand needed is: >sqlcmd -S
> \\.\pipe\mssql$microsoft##ssee\sql\query -E
> This yields the follwoing error:
> HResult 0x2, Level 16, State 1
> Named Pipes Provider: Could not open a connection to SQL Server [2].
> Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
> establi
> shing a connection to the server. When connecting to SQL Server 2005, this
> failu
> re may be caused by the fact that under the default settings SQL Server does
> not
> allow remote connections..
> Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
> TCP, Named Pipes and Shared Memory are enabled and configuration allows for
> remote connection (even thought this local)
> I have tried to modify the command with the specific instance and
> server\instance all result in the same error.
> I am at a loss as what to do to move these db's
> Can anyone help with this issue.
> Thanks,
> Mike Altman
>
>
|||Hi Ben,
I had read that this was not best practice, but it worked just fine. Thanks
for the help.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Hello Mike,
> Do not use sqlcmd. Just stop your SharePoint services. Detach your databases
> using Management Studio, go to the operating system and move all your
> database files to the new drive and then attach your databases using
> Management Studio again.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "travldc" wrote:

Error connecting to SQL from within same machine

I am trying to move my SharePoint db's from on drive on a SQL Server to
another. Apparently, This cannot be done with the Management Tool and must
be done with the sqlcmd.
The first comand needed is: >sqlcmd -S
\\.\pipe\mssql$microsoft##ssee\sql\query -E
This yields the follwoing error:
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
establi
shing a connection to the server. When connecting to SQL Server 2005, this
failu
re may be caused by the fact that under the default settings SQL Server does
not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
TCP, Named Pipes and Shared Memory are enabled and configuration allows for
remote connection (even thought this local)
I have tried to modify the command with the specific instance and
server\instance all result in the same error.
I am at a loss as what to do to move these db's
Can anyone help with this issue.
Thanks,
Mike AltmanHello Mike,
Do not use sqlcmd. Just stop your SharePoint services. Detach your databases
using Management Studio, go to the operating system and move all your
database files to the new drive and then attach your databases using
Management Studio again.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"travldc" wrote:
> I am trying to move my SharePoint db's from on drive on a SQL Server to
> another. Apparently, This cannot be done with the Management Tool and must
> be done with the sqlcmd.
> The first comand needed is: >sqlcmd -S
> \\.\pipe\mssql$microsoft##ssee\sql\query -E
> This yields the follwoing error:
> HResult 0x2, Level 16, State 1
> Named Pipes Provider: Could not open a connection to SQL Server [2].
> Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
> establi
> shing a connection to the server. When connecting to SQL Server 2005, this
> failu
> re may be caused by the fact that under the default settings SQL Server does
> not
> allow remote connections..
> Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
> TCP, Named Pipes and Shared Memory are enabled and configuration allows for
> remote connection (even thought this local)
> I have tried to modify the command with the specific instance and
> server\instance all result in the same error.
> I am at a loss as what to do to move these db's
> Can anyone help with this issue.
> Thanks,
> Mike Altman
>
>|||Hi Ben,
I had read that this was not best practice, but it worked just fine. Thanks
for the help.
"Ben Nevarez" wrote:
> Hello Mike,
> Do not use sqlcmd. Just stop your SharePoint services. Detach your databases
> using Management Studio, go to the operating system and move all your
> database files to the new drive and then attach your databases using
> Management Studio again.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "travldc" wrote:
> > I am trying to move my SharePoint db's from on drive on a SQL Server to
> > another. Apparently, This cannot be done with the Management Tool and must
> > be done with the sqlcmd.
> >
> > The first comand needed is: >sqlcmd -S
> > \\.\pipe\mssql$microsoft##ssee\sql\query -E
> >
> > This yields the follwoing error:
> >
> > HResult 0x2, Level 16, State 1
> > Named Pipes Provider: Could not open a connection to SQL Server [2].
> > Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
> > establi
> > shing a connection to the server. When connecting to SQL Server 2005, this
> > failu
> > re may be caused by the fact that under the default settings SQL Server does
> > not
> > allow remote connections..
> > Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
> >
> > TCP, Named Pipes and Shared Memory are enabled and configuration allows for
> > remote connection (even thought this local)
> >
> > I have tried to modify the command with the specific instance and
> > server\instance all result in the same error.
> >
> > I am at a loss as what to do to move these db's
> >
> > Can anyone help with this issue.
> >
> > Thanks,
> >
> > Mike Altman
> >
> >
> >
> >

Error connecting to SQL from within same machine

I am trying to move my SharePoint db's from on drive on a SQL Server to
another. Apparently, This cannot be done with the Management Tool and must
be done with the sqlcmd.
The first comand needed is: >sqlcmd -S
\\.\pipe\mssql$microsoft##ssee\sql\query -E
This yields the follwoing error:
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
establi
shing a connection to the server. When connecting to SQL Server 2005, this
failu
re may be caused by the fact that under the default settings SQL Server does
not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
TCP, Named Pipes and Shared Memory are enabled and configuration allows for
remote connection (even thought this local)
I have tried to modify the command with the specific instance and
server\instance all result in the same error.
I am at a loss as what to do to move these db's
Can anyone help with this issue.
Thanks,
Mike AltmanHello Mike,
Do not use sqlcmd. Just stop your SharePoint services. Detach your databases
using Management Studio, go to the operating system and move all your
database files to the new drive and then attach your databases using
Management Studio again.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"travldc" wrote:

> I am trying to move my SharePoint db's from on drive on a SQL Server to
> another. Apparently, This cannot be done with the Management Tool and mus
t
> be done with the sqlcmd.
> The first comand needed is: >sqlcmd -S
> \\.\pipe\mssql$microsoft##ssee\sql\query -E
> This yields the follwoing error:
> HResult 0x2, Level 16, State 1
> Named Pipes Provider: Could not open a connection to SQL Server [2].
> Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
> establi
> shing a connection to the server. When connecting to SQL Server 2005, this
> failu
> re may be caused by the fact that under the default settings SQL Server do
es
> not
> allow remote connections..
> Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
> TCP, Named Pipes and Shared Memory are enabled and configuration allows fo
r
> remote connection (even thought this local)
> I have tried to modify the command with the specific instance and
> server\instance all result in the same error.
> I am at a loss as what to do to move these db's
> Can anyone help with this issue.
> Thanks,
> Mike Altman
>
>|||Hi Ben,
I had read that this was not best practice, but it worked just fine. Thanks
for the help.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Hello Mike,
> Do not use sqlcmd. Just stop your SharePoint services. Detach your databas
es
> using Management Studio, go to the operating system and move all your
> database files to the new drive and then attach your databases using
> Management Studio again.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "travldc" wrote:
>

Error connecting to sql db on another computer

When I try to connect to an sql express db on another machine, I get this
message
TITLE: Connect to Server
--
Cannot connect to REIDARNOTEBOOK\SQLEXPRESS.
ADDITIONAL INFORMATION:
An error has occurred 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: 26 - Error Locating
Server/Instance Specified) (Microsoft SQL Server, Error: -1)
For help, click:
http://go.microsoft.com/fwlink?Prod...-1&LinkId=20476
BUTTONS:
OK
The connection between the 2 machines are OK, I can connect to a SQL2000 db,
but not an sql express db
reidarTAnd do you allow "remote connections" as the error message said, don't you?
"reidarT" <reidar@.eivon.no> wrote in message
news:O%23iA%230tuGHA.4888@.TK2MSFTNGP05.phx.gbl...
> When I try to connect to an sql express db on another machine, I get this
> message
> TITLE: Connect to Server
> --
> Cannot connect to REIDARNOTEBOOK\SQLEXPRESS.
> --
> ADDITIONAL INFORMATION:
> An error has occurred 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: 26 - Error Locating
> Server/Instance Specified) (Microsoft SQL Server, Error: -1)
> For help, click:
> http://go.microsoft.com/fwlink?Prod...-1&LinkId=20476
> --
> BUTTONS:
> OK
> The connection between the 2 machines are OK, I can connect to a SQL2000
> db,
> but not an sql express db
> reidarT
>|||reidarT wrote:
> When I try to connect to an sql express db on another machine, I get this
> message
> TITLE: Connect to Server
> --
> Cannot connect to REIDARNOTEBOOK\SQLEXPRESS.
> --
> ADDITIONAL INFORMATION:
> An error has occurred 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: 26 - Error Locating
> Server/Instance Specified) (Microsoft SQL Server, Error: -1)
> For help, click:
> http://go.microsoft.com/fwlink?Prod...-1&LinkId=20476
> --
> BUTTONS:
> OK
> The connection between the 2 machines are OK, I can connect to a SQL2000 d
b,
> but not an sql express db
> reidarT
>
Use the Surface Area Configuration Tool to allow remote connections.
They are disabled by default.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Error connecting to sql db on another computer

When I try to connect to an sql express db on another machine, I get this
message
TITLE: Connect to Server
--
Cannot connect to REIDARNOTEBOOK\SQLEXPRESS.
--
ADDITIONAL INFORMATION:
An error has occurred 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: 26 - Error Locating
Server/Instance Specified) (Microsoft SQL Server, Error: -1)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
--
BUTTONS:
OK
The connection between the 2 machines are OK, I can connect to a SQL2000 db,
but not an sql express db
reidarTAnd do you allow "remote connections" as the error message said, don't you?
"reidarT" <reidar@.eivon.no> wrote in message
news:O%23iA%230tuGHA.4888@.TK2MSFTNGP05.phx.gbl...
> When I try to connect to an sql express db on another machine, I get this
> message
> TITLE: Connect to Server
> --
> Cannot connect to REIDARNOTEBOOK\SQLEXPRESS.
> --
> ADDITIONAL INFORMATION:
> An error has occurred 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: 26 - Error Locating
> Server/Instance Specified) (Microsoft SQL Server, Error: -1)
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
> --
> BUTTONS:
> OK
> The connection between the 2 machines are OK, I can connect to a SQL2000
> db,
> but not an sql express db
> reidarT
>|||reidarT wrote:
> When I try to connect to an sql express db on another machine, I get this
> message
> TITLE: Connect to Server
> --
> Cannot connect to REIDARNOTEBOOK\SQLEXPRESS.
> --
> ADDITIONAL INFORMATION:
> An error has occurred 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: 26 - Error Locating
> Server/Instance Specified) (Microsoft SQL Server, Error: -1)
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
> --
> BUTTONS:
> OK
> The connection between the 2 machines are OK, I can connect to a SQL2000 db,
> but not an sql express db
> reidarT
>
Use the Surface Area Configuration Tool to allow remote connections.
They are disabled by default.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

error connecting to sql db

I have an asp.net project on my laptop 'supposed to be' connecting to a SQL DB on the same machine. But I keep getting this error:

System.Data.SqlClient.SqlException: Cannot open database requested in login 'ASPState'. Login fails. Login failed for user 'xyz'.

It's driving me nuts. Any help would be appreciated.

txs
sonnersYou have to go to Sql Server Manager, go to the database, click Add New User and add the user that needs permission, then give that user owner permission|||I did all this. My SQL knowledge isn't so bad. I've been using the main SQL login account as it's my local machine. This account works for other ASP sites but not for .Net ASP site.|||What does your connection string look like? You may need to add <identity impersonate="true"/> to your web.config file.

Terri