Showing posts with label network. Show all posts
Showing posts with label network. Show all posts

Monday, March 19, 2012

Connection Issues

Hi,

I have sql express server running on a network pc. I have created an application on the same pc that is able to access the data contained within the sql express server.

I have depolyed the application to another network pc, but it is not able to access the same data. I have also installed 'ssmse', this cant connect to the database either

I have enabled the TCP/IP Protocol on the server, enabled the browser service, disabled the firewall and restarted all services.

The PC that is unable to see the server via my application IS able to see and successfully connect to the sql server via a "datalink dialog" the test connection button returns "Test Connection Succeded"

Any ideas. Thanks for any help.

If you can connect with the datalink dialog the system should work in principle as long as the security and related systems are right.

But I would now look at your application and add some error checking on the connection so that you can trap the error and find out what is going wrong. You will find that the ado system will return some good error codes that you can trap and investigate.

|||

Hi,

Just discovered that the browser service was set to 'manual startup' and had bot been started afterall.

Thanks for your help & time.

Connection issue across network

I have about 30 machines that I currently manage. I should also say, I just
took over this position as Senior DBA. One machine is a Windows 2003 Quad
Processor 4GB ram box with SQL 2000 Standard Edition installed. I am in the
SQL Admin group and SQL is set for both SQL and WIndows authenication. Here
is the problem, I can not connect to this box from Enterprise Manager from my
desktop. If I Remote Admin into the box everything works fine. If I try to
register the server with any authenication method it doesnt work. I have
tried my personal account, domain accounts, SA, other admin accounts and
they all come back with Server does not exist or access denied. If I log in
locally or via RA everything is fine. Other admins can access this box
remotely and we all have the same security settings. All of the other
servers register fine.
I reviewed the Windows event log and auditing show that SQL has accepted my
authenication as trusted. SQL is using the standard TCP port 1433.
Any ideas?
Thanks,
Raymond S Laubert
MCITP:Adminstration, MCDBA, MCSE, MCT
Raymond Laubert
MCSE, MCDBA, MCT
So you can connect on the server (via TA session) but not from a client.
Consider that the client needs to be permitted to see the server ports and the server ports must be visible outside of the box. Here are a few things to check:
a.. Is the SQL Server Browser service running on the server?
b.. Are the external protocols enabled? (use SQL Server Surface Area Config tool)
c.. On the client, is the firewall configured to permit access to the ports?
d.. Are you trying to connect to the ports or are you letting the DNS server resolve the server instance?
e.. How are you trying to connect to the instance? In code? (Let's see the ConnectionString)
f.. Does the server show up in the list of visible servers in Server Explorer (Visual Studio)?
g.. Is the little yellow wire connected to the back of the server and does it lead (eventually) to the client? ;)
Check out Chapter 9 of my book... it's written for you (personally)... ;)
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Ray Laubert" <ray@.rsl-webhosting.com> wrote in message news:70350431-1C89-488A-9AFB-B44A6B4562BC@.microsoft.com...
>I have about 30 machines that I currently manage. I should also say, I just
> took over this position as Senior DBA. One machine is a Windows 2003 Quad
> Processor 4GB ram box with SQL 2000 Standard Edition installed. I am in the
> SQL Admin group and SQL is set for both SQL and WIndows authenication. Here
> is the problem, I can not connect to this box from Enterprise Manager from my
> desktop. If I Remote Admin into the box everything works fine. If I try to
> register the server with any authenication method it doesnt work. I have
> tried my personal account, domain accounts, SA, other admin accounts and
> they all come back with Server does not exist or access denied. If I log in
> locally or via RA everything is fine. Other admins can access this box
> remotely and we all have the same security settings. All of the other
> servers register fine.
> I reviewed the Windows event log and auditing show that SQL has accepted my
> authenication as trusted. SQL is using the standard TCP port 1433.
> Any ideas?
> Thanks,
> Raymond S Laubert
> MCITP:Adminstration, MCDBA, MCSE, MCT
> --
> Raymond Laubert
> MCSE, MCDBA, MCT
|||Well, lets see...
I can connect to all the other servers via Enterprise Manager, so network
issues are taken care of.
I can connect to this server via Remote Admin and Terminal Server so
Security issues are taken care of.
Other DBAs and support personnel can connect to the server via Enterprise
Manager so configuration issues are taken care of.
Hmmm... I don't have a yellow wire... maybe that is the issue... oh
wait... mine is blue... yep it's connected as well.
Remember, I can connect to the other 29 servers via Enterprise Manager, this
is the only one I can not connect to. Other DBAs can connect to this server
as well as the other 29. We are all in the same security groups. I can ping
the server by address and name, so network is good.
I try not to put easy stuff on the board, but this one has me stumped.
Oh send me a copy of your book and I will proof read it for you, free of
charge of course. Maybe even promote it in the SQL Classes I teach.
Raymond Laubert
MCSE, MCDBA, MCT
"William (Bill) Vaughn" wrote:
[vbcol=seagreen]
> So you can connect on the server (via TA session) but not from a client.
> Consider that the client needs to be permitted to see the server ports and the server ports must be visible outside of the box. Here are a few things to check:
> a.. Is the SQL Server Browser service running on the server?
> b.. Are the external protocols enabled? (use SQL Server Surface Area Config tool)
> c.. On the client, is the firewall configured to permit access to the ports?
> d.. Are you trying to connect to the ports or are you letting the DNS server resolve the server instance?
> e.. How are you trying to connect to the instance? In code? (Let's see the ConnectionString)
> f.. Does the server show up in the list of visible servers in Server Explorer (Visual Studio)?
> g.. Is the little yellow wire connected to the back of the server and does it lead (eventually) to the client? ;)
> Check out Chapter 9 of my book... it's written for you (personally)... ;)
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
> "Ray Laubert" <ray@.rsl-webhosting.com> wrote in message news:70350431-1C89-488A-9AFB-B44A6B4562BC@.microsoft.com...
|||Send me your snail-mail address and I will...
Have you tried ODBC Ping?
Is the SqlBrowser service started?
Has the SQL Server been configured to expose the external protocols? It
sounds like it, but I would double-check. Are you addressing it via DNS
address or by IP? Again, seeing the connectstring would help.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Ray Laubert" <ray@.rsl-webhosting.com> wrote in message
news:46BC5BDF-6A4F-4817-88E1-29A8F83E4FB8@.microsoft.com...[vbcol=seagreen]
> Well, lets see...
> I can connect to all the other servers via Enterprise Manager, so network
> issues are taken care of.
> I can connect to this server via Remote Admin and Terminal Server so
> Security issues are taken care of.
> Other DBAs and support personnel can connect to the server via Enterprise
> Manager so configuration issues are taken care of.
> Hmmm... I don't have a yellow wire... maybe that is the issue... oh
> wait... mine is blue... yep it's connected as well.
> Remember, I can connect to the other 29 servers via Enterprise Manager,
> this
> is the only one I can not connect to. Other DBAs can connect to this
> server
> as well as the other 29. We are all in the same security groups. I can
> ping
> the server by address and name, so network is good.
> I try not to put easy stuff on the board, but this one has me stumped.
> Oh send me a copy of your book and I will proof read it for you, free of
> charge of course. Maybe even promote it in the SQL Classes I teach.
> --
> Raymond Laubert
> MCSE, MCDBA, MCT
>
> "William (Bill) Vaughn" wrote:

Connection issue across network

I have about 30 machines that I currently manage. I should also say, I just
took over this position as Senior DBA. One machine is a Windows 2003 Quad
Processor 4GB ram box with SQL 2000 Standard Edition installed. I am in the
SQL Admin group and SQL is set for both SQL and WIndows authenication. Here
is the problem, I can not connect to this box from Enterprise Manager from m
y
desktop. If I Remote Admin into the box everything works fine. If I try to
register the server with any authenication method it doesnt work. I have
tried my personal account, domain accounts, SA, other admin accounts and
they all come back with Server does not exist or access denied. If I log in
locally or via RA everything is fine. Other admins can access this box
remotely and we all have the same security settings. All of the other
servers register fine.
I reviewed the Windows event log and auditing show that SQL has accepted my
authenication as trusted. SQL is using the standard TCP port 1433.
Any ideas?
Thanks,
Raymond S Laubert
MCITP:Adminstration, MCDBA, MCSE, MCT
--
Raymond Laubert
MCSE, MCDBA, MCTSo you can connect on the server (via TA session) but not from a client.
Consider that the client needs to be permitted to see the server ports and t
he server ports must be visible outside of the box. Here are a few things to
check:
a.. Is the SQL Server Browser service running on the server?
b.. Are the external protocols enabled? (use SQL Server Surface Area Config
tool)
c.. On the client, is the firewall configured to permit access to the ports?
d.. Are you trying to connect to the ports or are you letting the DNS server
resolve the server instance?
e.. How are you trying to connect to the instance? In code? (Let's see the C
onnectionString)
f.. Does the server show up in the list of visible servers in Server Explore
r (Visual Studio)?
g.. Is the little yellow wire connected to the back of the server and does i
t lead (eventually) to the client? ;)
Check out Chapter 9 of my book... it's written for you (personally)... ;)
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Ray Laubert" <ray@.rsl-webhosting.com> wrote in message news:70350431-1C89-488A-9AFB-B44A6B4
562BC@.microsoft.com...
>I have about 30 machines that I currently manage. I should also say, I jus
t
> took over this position as Senior DBA. One machine is a Windows 2003 Quad
> Processor 4GB ram box with SQL 2000 Standard Edition installed. I am in t
he
> SQL Admin group and SQL is set for both SQL and WIndows authenication. Her
e
> is the problem, I can not connect to this box from Enterprise Manager from
my
> desktop. If I Remote Admin into the box everything works fine. If I try
to
> register the server with any authenication method it doesnt work. I have
> tried my personal account, domain accounts, SA, other admin accounts and
> they all come back with Server does not exist or access denied. If I log
in
> locally or via RA everything is fine. Other admins can access this box
> remotely and we all have the same security settings. All of the other
> servers register fine.
> I reviewed the Windows event log and auditing show that SQL has accepted m
y
> authenication as trusted. SQL is using the standard TCP port 1433.
>
> Any ideas?
>
> Thanks,
>
> Raymond S Laubert
> MCITP:Adminstration, MCDBA, MCSE, MCT
> --
> Raymond Laubert
> MCSE, MCDBA, MCT|||Well, lets see...
I can connect to all the other servers via Enterprise Manager, so network
issues are taken care of.
I can connect to this server via Remote Admin and Terminal Server so
Security issues are taken care of.
Other DBAs and support personnel can connect to the server via Enterprise
Manager so configuration issues are taken care of.
Hmmm... I don't have a yellow wire... maybe that is the issue... oh
wait... mine is blue... yep it's connected as well.
Remember, I can connect to the other 29 servers via Enterprise Manager, this
is the only one I can not connect to. Other DBAs can connect to this server
as well as the other 29. We are all in the same security groups. I can pin
g
the server by address and name, so network is good.
I try not to put easy stuff on the board, but this one has me stumped.
Oh send me a copy of your book and I will proof read it for you, free of
charge of course. Maybe even promote it in the SQL Classes I teach.
--
Raymond Laubert
MCSE, MCDBA, MCT
"William (Bill) Vaughn" wrote:
[vbcol=seagreen]
> So you can connect on the server (via TA session) but not from a client.
> Consider that the client needs to be permitted to see the server ports and
the server ports must be visible outside of the box. Here are a few things
to check:
> a.. Is the SQL Server Browser service running on the server?
> b.. Are the external protocols enabled? (use SQL Server Surface Area Con
fig tool)
> c.. On the client, is the firewall configured to permit access to the po
rts?
> d.. Are you trying to connect to the ports or are you letting the DNS se
rver resolve the server instance?
> e.. How are you trying to connect to the instance? In code? (Let's see t
he ConnectionString)
> f.. Does the server show up in the list of visible servers in Server Exp
lorer (Visual Studio)?
> g.. Is the little yellow wire connected to the back of the server and do
es it lead (eventually) to the client? ;)
> Check out Chapter 9 of my book... it's written for you (personally)... ;)
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ----
---
> "Ray Laubert" <ray@.rsl-webhosting.com> wrote in message news:70350431-1C89
-488A-9AFB-B44A6B4562BC@.microsoft.com...|||Send me your snail-mail address and I will...
Have you tried ODBC Ping?
Is the SqlBrowser service started?
Has the SQL Server been configured to expose the external protocols? It
sounds like it, but I would double-check. Are you addressing it via DNS
address or by IP? Again, seeing the connectstring would help.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Ray Laubert" <ray@.rsl-webhosting.com> wrote in message
news:46BC5BDF-6A4F-4817-88E1-29A8F83E4FB8@.microsoft.com...[vbcol=seagreen]
> Well, lets see...
> I can connect to all the other servers via Enterprise Manager, so network
> issues are taken care of.
> I can connect to this server via Remote Admin and Terminal Server so
> Security issues are taken care of.
> Other DBAs and support personnel can connect to the server via Enterprise
> Manager so configuration issues are taken care of.
> Hmmm... I don't have a yellow wire... maybe that is the issue... oh
> wait... mine is blue... yep it's connected as well.
> Remember, I can connect to the other 29 servers via Enterprise Manager,
> this
> is the only one I can not connect to. Other DBAs can connect to this
> server
> as well as the other 29. We are all in the same security groups. I can
> ping
> the server by address and name, so network is good.
> I try not to put easy stuff on the board, but this one has me stumped.
> Oh send me a copy of your book and I will proof read it for you, free of
> charge of course. Maybe even promote it in the SQL Classes I teach.
> --
> Raymond Laubert
> MCSE, MCDBA, MCT
>
> "William (Bill) Vaughn" wrote:
>

Thursday, March 8, 2012

Connection failure OR General network error OR Timeout

We are running some applications and 3 times a day and every night we get the
following error
Connection failure (Number : -2147467259)
OR
[DBNETLIB][ConnectionRead (recv()).]General network error. Check your
network documentation. (Number : -2147467259)
OR
Timeout expired (Number : -2147467259)
It happens random, has nothing to do with backup,...
This is since we use SQLServer 2005, never had any problems with
SQLServer2000.
Everything else is the same.
Any help would be strongly appreciatedDid you get a solution to your problem? I am having a similar porblem, with
home-based users intermittently losing their connection.
Peter
"Multatuli" wrote:
> We are running some applications and 3 times a day and every night we get the
> following error
> Connection failure (Number : -2147467259)
> OR
> [DBNETLIB][ConnectionRead (recv()).]General network error. Check your
> network documentation. (Number : -2147467259)
> OR
> Timeout expired (Number : -2147467259)
> It happens random, has nothing to do with backup,...
> This is since we use SQLServer 2005, never had any problems with
> SQLServer2000.
> Everything else is the same.
> Any help would be strongly appreciated
>

Connection failure on standalone MSDE installtion when network is lost

Scenario -
On a standalone installation i.e client and SQL server are on same
machine, if network connection is lost while preparing SQL server
connection through client application, then SQL connection could not be
established. This was detected only on few machines. The configuration
details are:
OS : Windows 2000 SP 4 with MSDE
Error : MSVC exception occurred. This is not consistent. Some times it
throws error in sql server connectivity DLLs.Check local security policies on client machines that screw up. I had this
probelem recently.
<shridhargune@.hotmail.com> wrote in message
news:1122392145.762770.32950@.g49g2000cwa.googlegroups.com...
> Scenario -
> On a standalone installation i.e client and SQL server are on same
> machine, if network connection is lost while preparing SQL server
> connection through client application, then SQL connection could not be
> established. This was detected only on few machines. The configuration
> details are:
> OS : Windows 2000 SP 4 with MSDE
> Error : MSVC exception occurred. This is not consistent. Some times it
> throws error in sql server connectivity DLLs.
>

Connection failure on standalone MSDE installtion when network is lost

Scenario -
On a standalone installation i.e client and SQL server are on same
machine, if network connection is lost while preparing SQL server
connection through client application, then SQL connection could not be
established. This was detected only on few machines. The configuration
details are:
OS : Windows 2000 SP 4 with MSDE
Error : MSVC exception occurred. This is not consistent. Some times it
throws error in sql server connectivity DLLs.
Check local security policies on client machines that screw up. I had this
probelem recently.
<shridhargune@.hotmail.com> wrote in message
news:1122392145.762770.32950@.g49g2000cwa.googlegro ups.com...
> Scenario -
> On a standalone installation i.e client and SQL server are on same
> machine, if network connection is lost while preparing SQL server
> connection through client application, then SQL connection could not be
> established. This was detected only on few machines. The configuration
> details are:
> OS : Windows 2000 SP 4 with MSDE
> Error : MSVC exception occurred. This is not consistent. Some times it
> throws error in sql server connectivity DLLs.
>

Connection fails during unit test

Hi
I am having trouble with a connection within our local network. A
development machine needs to connect to the main dev db server. Visual
Studio and Enterprise Manager on the dev machine connect fine. The
application under development connects fine when it is run with the
connection string
"Data Source=[servername]; Initial Catalog=[dbName];
Trusted_Connection=yes;"
The application also connects nicely using a named login and password.
My problem is, when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. We have completely turned off all
firewalls etc to no avail.
Any Ideas?
Thanks
Graham
Have the remote machine test connecting with a new ODBC DSN. Press the
Test
button on the ODBC Wizard and report the OS error returned. Since the
machine is remote,
it could be a problem with name resolution.
Ex. 11001 == HostNameNotFound == DNS/WINS issue.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Kevin McDonnell [MSFT] wrote:

> Have the remote machine test connecting with a new ODBC DSN. Press the
> Test
> button on the ODBC Wizard and report the OS error returned. Since the
> machine is remote,
> it could be a problem with name resolution.
> Ex. 11001 == HostNameNotFound == DNS/WINS issue.
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks for the reply Kevin...
I have tried the ODBC wizard and the connection works fine. As I said I
have no problem connecting from the remote machine using Enterprise
Manager and Visual Studio, it is just the NUnit tests that can't access
the db server.
Thanks again
Graham
|||"when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. "
I would run network traces to determine where the problem is. You need to
validate
that the tcp connection is being made and the connection string is correct.
An ODBC trace won't show
you this level of detail.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Kevin McDonnell [MSFT] wrote:
> "when we run unit tests with NUnit on a remote machine the
> connection attempt returns 'Sql Server does not exist or access denied'
> with the same connection string. "
> I would run network traces to determine where the problem is. You need to
> validate
> that the tcp connection is being made and the connection string is correct.
> An ODBC trace won't show
> you this level of detail.
>
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks again Kevin
My networking knowledge is a little lacking I'm afraid. Could you give
me some pointers on how I would go about running 'network traces'.
Thanks
Graham
|||SQL Server is a Winsock application. So the 2nd article will help you
understand what to look for.
If you need more help you can always open up a support case.
Windows 2000 Server has netmon installed . You just need to enable it via
Add/Remove Windows components.
This version captures traffic to and from that machine. Only SMS has the
full version to capture traffic on any machine.
Q148942 How to Capture Network Traffic with Network Monitor
Q169292 The Basics of Reading TCP/IP Traces
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Connection fails during unit test

Hi
I am having trouble with a connection within our local network. A
development machine needs to connect to the main dev db server. Visual
Studio and Enterprise Manager on the dev machine connect fine. The
application under development connects fine when it is run with the
connection string
"Data Source=[servername]; Initial Catalog=[dbName];
Trusted_Connection=yes;"
The application also connects nicely using a named login and password.
My problem is, when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. We have completely turned off all
firewalls etc to no avail.
Any Ideas?
Thanks
GrahamHave the remote machine test connecting with a new ODBC DSN. Press the
Test
button on the ODBC Wizard and report the OS error returned. Since the
machine is remote,
it could be a problem with name resolution.
Ex. 11001 == HostNameNotFound == DNS/WINS issue.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Kevin McDonnell [MSFT] wrote:

> Have the remote machine test connecting with a new ODBC DSN. Press the
> Test
> button on the ODBC Wizard and report the OS error returned. Since the
> machine is remote,
> it could be a problem with name resolution.
> Ex. 11001 == HostNameNotFound == DNS/WINS issue.
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks for the reply Kevin...
I have tried the ODBC wizard and the connection works fine. As I said I
have no problem connecting from the remote machine using Enterprise
Manager and Visual Studio, it is just the NUnit tests that can't access
the db server.
Thanks again
Graham|||"when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. "
I would run network traces to determine where the problem is. You need to
validate
that the tcp connection is being made and the connection string is correct.
An ODBC trace won't show
you this level of detail.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Kevin McDonnell [MSFT] wrote:
> "when we run unit tests with NUnit on a remote machine the
> connection attempt returns 'Sql Server does not exist or access denied'
> with the same connection string. "
> I would run network traces to determine where the problem is. You need to
> validate
> that the tcp connection is being made and the connection string is correct
.
> An ODBC trace won't show
> you this level of detail.
>
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks again Kevin
My networking knowledge is a little lacking I'm afraid. Could you give
me some pointers on how I would go about running 'network traces'.
Thanks
Graham|||SQL Server is a Winsock application. So the 2nd article will help you
understand what to look for.
If you need more help you can always open up a support case.
Windows 2000 Server has netmon installed . You just need to enable it via
Add/Remove Windows components.
This version captures traffic to and from that machine. Only SMS has the
full version to capture traffic on any machine.
Q148942 How to Capture Network Traffic with Network Monitor
Q169292 The Basics of Reading TCP/IP Traces
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Friday, February 24, 2012

Connection broken

We have added a new firewall to our network and now I keep getting my
connection dropped when running from home. Port 1433 is open.
I am connecting via a VPN and it was working fine. Nothing has changed in
this respect. If I disconnect my Firewall at home and go to the internet
directly, I have no problems (but this firewall worked fine before and does
now sporadically).
Now, however, I can connect fine but my queries give me the following
message after about 30 seconds:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
(CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
This says I was connected, but now the Connection is broken.
If I were to give it an invalid command such as "who_is", I do get the
following results:
Server: Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'who_is'.
This comes directly from Sql Server, so I know the my machine at home can
talk to the Server fine.
Why am I not able to query without losing connection?
Thanks,
Tom
I found out what is happening, but not why.
Apparently, Sql Server using UDP service 17 port 1434 for something.
I looked at my firewall settings and it is dropping my packets because they
are fragmented. It was confusing at first, because it worked fine without
the firewall. But what must be happening is that the data is being passed
on 1433 (which I would expect) and since there is no firewall to strip bad
packets it lets the fragmented packet through. For some reason, because of
this packet the connection is dropped (not sure what constitutes a dropped
connection) so I assume the actual response hasn't been sent yet and now it
can't send it because the connection is now gone (I think).
Anyone know why this is happening or what this port (1434) is used for? I
knew about 1433, but this is the first I had heard about 1434.
Thanks,
Tom
"tshad" <tscheiderich@.ftsolutions.com> wrote in message
news:ewYccw6QGHA.5808@.TK2MSFTNGP12.phx.gbl...
> We have added a new firewall to our network and now I keep getting my
> connection dropped when running from home. Port 1433 is open.
> I am connecting via a VPN and it was working fine. Nothing has changed in
> this respect. If I disconnect my Firewall at home and go to the internet
> directly, I have no problems (but this firewall worked fine before and
> does now sporadically).
> Now, however, I can connect fine but my queries give me the following
> message after about 30 seconds:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
> (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> This says I was connected, but now the Connection is broken.
> If I were to give it an invalid command such as "who_is", I do get the
> following results:
> Server: Msg 2812, Level 16, State 62, Line 1
> Could not find stored procedure 'who_is'.
> This comes directly from Sql Server, so I know the my machine at home can
> talk to the Server fine.
> Why am I not able to query without losing connection?
> Thanks,
> Tom
>
|||UDP 1434 is the SQL Server Resolution Service used to find
what port number a named instance is listening on.
You can find more information in the following articles:
INF: TCP Ports Needed for Communication to SQL Server
Through a Firewall
http://support.microsoft.com/?id=287932
How to use static and dynamic port allocation in SQL Server
2000
http://support.microsoft.com/?id=823938
-Sue
On Fri, 10 Mar 2006 08:41:32 -0800, "tshad"
<tscheiderich@.ftsolutions.com> wrote:

>I found out what is happening, but not why.
>Apparently, Sql Server using UDP service 17 port 1434 for something.
>I looked at my firewall settings and it is dropping my packets because they
>are fragmented. It was confusing at first, because it worked fine without
>the firewall. But what must be happening is that the data is being passed
>on 1433 (which I would expect) and since there is no firewall to strip bad
>packets it lets the fragmented packet through. For some reason, because of
>this packet the connection is dropped (not sure what constitutes a dropped
>connection) so I assume the actual response hasn't been sent yet and now it
>can't send it because the connection is now gone (I think).
>Anyone know why this is happening or what this port (1434) is used for? I
>knew about 1433, but this is the first I had heard about 1434.
>Thanks,
>Tom
>"tshad" <tscheiderich@.ftsolutions.com> wrote in message
>news:ewYccw6QGHA.5808@.TK2MSFTNGP12.phx.gbl...
>

Connection broken

We have added a new firewall to our network and now I keep getting my
connection dropped when running from home. Port 1433 is open.
I am connecting via a VPN and it was working fine. Nothing has changed in
this respect. If I disconnect my Firewall at home and go to the internet
directly, I have no problems (but this firewall worked fine before and does
now sporadically).
Now, however, I can connect fine but my queries give me the following
message after about 30 seconds:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
(CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
This says I was connected, but now the Connection is broken.
If I were to give it an invalid command such as "who_is", I do get the
following results:
Server: Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'who_is'.
This comes directly from Sql Server, so I know the my machine at home can
talk to the Server fine.
Why am I not able to query without losing connection?
Thanks,
TomI found out what is happening, but not why.
Apparently, Sql Server using UDP service 17 port 1434 for something.
I looked at my firewall settings and it is dropping my packets because they
are fragmented. It was confusing at first, because it worked fine without
the firewall. But what must be happening is that the data is being passed
on 1433 (which I would expect) and since there is no firewall to strip bad
packets it lets the fragmented packet through. For some reason, because of
this packet the connection is dropped (not sure what constitutes a dropped
connection) so I assume the actual response hasn't been sent yet and now it
can't send it because the connection is now gone (I think).
Anyone know why this is happening or what this port (1434) is used for? I
knew about 1433, but this is the first I had heard about 1434.
Thanks,
Tom
"tshad" <tscheiderich@.ftsolutions.com> wrote in message
news:ewYccw6QGHA.5808@.TK2MSFTNGP12.phx.gbl...
> We have added a new firewall to our network and now I keep getting my
> connection dropped when running from home. Port 1433 is open.
> I am connecting via a VPN and it was working fine. Nothing has changed in
> this respect. If I disconnect my Firewall at home and go to the internet
> directly, I have no problems (but this firewall worked fine before and
> does now sporadically).
> Now, however, I can connect fine but my queries give me the following
> message after about 30 seconds:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
> (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> This says I was connected, but now the Connection is broken.
> If I were to give it an invalid command such as "who_is", I do get the
> following results:
> Server: Msg 2812, Level 16, State 62, Line 1
> Could not find stored procedure 'who_is'.
> This comes directly from Sql Server, so I know the my machine at home can
> talk to the Server fine.
> Why am I not able to query without losing connection?
> Thanks,
> Tom
>|||UDP 1434 is the SQL Server Resolution Service used to find
what port number a named instance is listening on.
You can find more information in the following articles:
INF: TCP Ports Needed for Communication to SQL Server
Through a Firewall
http://support.microsoft.com/?id=287932
How to use static and dynamic port allocation in SQL Server
2000
http://support.microsoft.com/?id=823938
-Sue
On Fri, 10 Mar 2006 08:41:32 -0800, "tshad"
<tscheiderich@.ftsolutions.com> wrote:
>I found out what is happening, but not why.
>Apparently, Sql Server using UDP service 17 port 1434 for something.
>I looked at my firewall settings and it is dropping my packets because they
>are fragmented. It was confusing at first, because it worked fine without
>the firewall. But what must be happening is that the data is being passed
>on 1433 (which I would expect) and since there is no firewall to strip bad
>packets it lets the fragmented packet through. For some reason, because of
>this packet the connection is dropped (not sure what constitutes a dropped
>connection) so I assume the actual response hasn't been sent yet and now it
>can't send it because the connection is now gone (I think).
>Anyone know why this is happening or what this port (1434) is used for? I
>knew about 1433, but this is the first I had heard about 1434.
>Thanks,
>Tom
>"tshad" <tscheiderich@.ftsolutions.com> wrote in message
>news:ewYccw6QGHA.5808@.TK2MSFTNGP12.phx.gbl...
>> We have added a new firewall to our network and now I keep getting my
>> connection dropped when running from home. Port 1433 is open.
>> I am connecting via a VPN and it was working fine. Nothing has changed in
>> this respect. If I disconnect my Firewall at home and go to the internet
>> directly, I have no problems (but this firewall worked fine before and
>> does now sporadically).
>> Now, however, I can connect fine but my queries give me the following
>> message after about 30 seconds:
>> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
>> (CheckforData()).
>> Server: Msg 11, Level 16, State 1, Line 0
>> General network error. Check your network documentation.
>> Connection Broken
>> This says I was connected, but now the Connection is broken.
>> If I were to give it an invalid command such as "who_is", I do get the
>> following results:
>> Server: Msg 2812, Level 16, State 62, Line 1
>> Could not find stored procedure 'who_is'.
>> This comes directly from Sql Server, so I know the my machine at home can
>> talk to the Server fine.
>> Why am I not able to query without losing connection?
>> Thanks,
>> Tom
>

Connection broken

We have added a new firewall to our network and now I keep getting my
connection dropped when running from home. Port 1433 is open.
I am connecting via a VPN and it was working fine. Nothing has changed in
this respect. If I disconnect my Firewall at home and go to the internet
directly, I have no problems (but this firewall worked fine before and does
now sporadically).
Now, however, I can connect fine but my queries give me the following
message after about 30 seconds:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForD
ata
(CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
This says I was connected, but now the Connection is broken.
If I were to give it an invalid command such as "who_is", I do get the
following results:
Server: Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'who_is'.
This comes directly from Sql Server, so I know the my machine at home can
talk to the Server fine.
Why am I not able to query without losing connection?
Thanks,
TomI found out what is happening, but not why.
Apparently, Sql Server using UDP service 17 port 1434 for something.
I looked at my firewall settings and it is dropping my packets because they
are fragmented. It was confusing at first, because it worked fine without
the firewall. But what must be happening is that the data is being passed
on 1433 (which I would expect) and since there is no firewall to strip bad
packets it lets the fragmented packet through. For some reason, because of
this packet the connection is dropped (not sure what constitutes a dropped
connection) so I assume the actual response hasn't been sent yet and now it
can't send it because the connection is now gone (I think).
Anyone know why this is happening or what this port (1434) is used for? I
knew about 1433, but this is the first I had heard about 1434.
Thanks,
Tom
"tshad" <tscheiderich@.ftsolutions.com> wrote in message
news:ewYccw6QGHA.5808@.TK2MSFTNGP12.phx.gbl...
> We have added a new firewall to our network and now I keep getting my
> connection dropped when running from home. Port 1433 is open.
> I am connecting via a VPN and it was working fine. Nothing has changed in
> this respect. If I disconnect my Firewall at home and go to the internet
> directly, I have no problems (but this firewall worked fine before and
> does now sporadically).
> Now, however, I can connect fine but my queries give me the following
> message after about 30 seconds:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckFo
rData
> (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> This says I was connected, but now the Connection is broken.
> If I were to give it an invalid command such as "who_is", I do get the
> following results:
> Server: Msg 2812, Level 16, State 62, Line 1
> Could not find stored procedure 'who_is'.
> This comes directly from Sql Server, so I know the my machine at home can
> talk to the Server fine.
> Why am I not able to query without losing connection?
> Thanks,
> Tom
>|||UDP 1434 is the SQL Server Resolution Service used to find
what port number a named instance is listening on.
You can find more information in the following articles:
INF: TCP Ports Needed for Communication to SQL Server
Through a Firewall
http://support.microsoft.com/?id=287932
How to use static and dynamic port allocation in SQL Server
2000
http://support.microsoft.com/?id=823938
-Sue
On Fri, 10 Mar 2006 08:41:32 -0800, "tshad"
<tscheiderich@.ftsolutions.com> wrote:

>I found out what is happening, but not why.
>Apparently, Sql Server using UDP service 17 port 1434 for something.
>I looked at my firewall settings and it is dropping my packets because they
>are fragmented. It was confusing at first, because it worked fine without
>the firewall. But what must be happening is that the data is being passed
>on 1433 (which I would expect) and since there is no firewall to strip bad
>packets it lets the fragmented packet through. For some reason, because of
>this packet the connection is dropped (not sure what constitutes a dropped
>connection) so I assume the actual response hasn't been sent yet and now it
>can't send it because the connection is now gone (I think).
>Anyone know why this is happening or what this port (1434) is used for? I
>knew about 1433, but this is the first I had heard about 1434.
>Thanks,
>Tom
>"tshad" <tscheiderich@.ftsolutions.com> wrote in message
>news:ewYccw6QGHA.5808@.TK2MSFTNGP12.phx.gbl...
>

Sunday, February 19, 2012

Connection and permissions

Hello all,

Why can't I connect to my database which is located on another PC on a Peer to Peer Network?

I have two PCs. (Details below) of which the database is on PC 1 and is called Surveys

My connection works fine from PC1 but from PC2 it does not work.

The connection string I am using is Server=PCWillys\SQLEXPRESS;Database=Surveys;Trusted_Connection=True

Is this because I need to set up Permissions on the database for LAPTOP\Phil.

If so How does one do this?

Thanks in advance,

Phil

PC 1

UserName: PCWILLYS\Willys

ServerName: PCWILLYS\SQLEXPRESS

PC 2

UserName: LAPTOP\Phil

SQL Express is configured by default to not accept remote connections. You can configure it to allow remote connection using the following KB Article:

914277 How to configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

Regards,

Mike Wachal
SQL Express team

-
Check out my tips for getting your answer faster and how to ask a good question: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=307712&SiteID=1

Tuesday, February 14, 2012

Connecting to the SQLEXPRESS on your computer

How do I connect to the SQLEXPRESS installed on my computer without network connection (as a standalone computer)?

Thanks.

hi,

local connections are usually performed via shared memory, so you do not require network protocols to be enabled to connect to a local instance..

what kind of problems are you experiencing? you usually generate a connection string like those provided in http://www.connectionstrings.com/, thus something similar to

Data Source=(Local)\NamedInstanceName;Initial Catalog=the_database;Integrated Security=SSPI;

regards

|||

I was having problems connecting to my local PC even after creating a security user and using the correct connection string. Turns out that I needed to go into SQL Server Configuration Manager and enable TCP/IP Protocol. Everything was disabled by default. Start, All Programs, Microsoft SQL Server 2005, Configuaration Tools, SQL Server Configuration Manager (local), SQL Native Client Configuration, Client Protocols, Right Click TCP/IP and select properties to enable.

|||

Hi Cecook,

You were probably connecting through MDAC. This is fine and fully supported, but you do have to enable TCP/IP in order to connect with legacy providers. If you use the new SQL Native Client (SNAC) you can connect directly to SQL using Shared Memory and you don't need to enable TCP/IP for local connections. SNAC also supports ODBC and OLEDB as well.

Note: You always have to enable TCP/IP or Named Pipes to connect to SQL from a remote client.

Mike

Connecting to SQLServer 2000 (sqlsrv32.dll)

Hello,

I am having problem with our network. We run a clinic database system that uses SQLServer 2000 Enterprise as the backend, and Microsoft Access on the front end.

I have had a running problem with all our newer machines (which run Windows 2000 or XP) in that while it connects to the server and retrieves some of the info properly, on some of the pages it doesnt. It will take 2 or 3 minutes for a page of the database to load, and even then not all the information will be retrieved properly.

I was able to fix the problem on the Windows 2000 machines by replacing the Sqlsrv32.dll file with an older version (usually with 3.70.06.23). And then the W2000 machines would work. But for some reason, the XP machines wont accept the older sqlsrv32.dll file...it gives me this error:
SQLState: 'HY000'
SQL Server Error: 126 Unable to load communication module driver correctly.

...and i cant seem to downgrade the MDAC...

any ideas on what I can do?

thanksYou didnt test it properly before it was rolled out for XP, did you?

Tut tut....

Best check technet & see if there is a work around. Failing that, best roll XP boxes back to W2000. Quick, easy & saves face....then I'd spend a LOT of time ironing out the XP issue BEFORE it goes near the client again.

HTH,

Cheers,|||no they are the new computers we got in...they come with XP loaded on them already...

i'll check technet...and then possibly put W2K on them...

thanks...

Sunday, February 12, 2012

Connecting to SQL Server with database on NFS

I tried to connect to SQL server 2005 express in LAN Using C# express

I got this msg

the file \\blablabla\\blablabla.mdf is on a network path is not supported for database file.An Attempt to attach an auto-named database for file \\blablabla\blablabla.mdf failed. a database with same name is exist, or specified file can not be opened, or its located on UNC share.

Is that mean :

I can not connect to SQL server remotly using express edition of C#

SQL server dosen't support connection in LAN

I tried to set all options like enable TCP IP connection and networks

by the way

The data has unquie name and it is located in shared folder and I can easly to connect to database like access with no problem

I will be thankful if you can help me

With the Express Edition of SQL Server you can't connect to databases over LAN. Only local database are supported.|||

Firstly Thank you very much to help me..

I read in features of sql express we can make the data in the server and shares the information with others clients. Also because sql express support web devlopment ASP that's mean the databse should be shared in the web ,, All that's mean sql server support to be in local area network !

please be sure, because I think visual C# express dosnt support client server database not sql server !

Im waiting for your comments :-)

|||I am able to connect to an instance of SQL Server Express from seperate machines on the same network using Server Management Studio Express CTP. So it appears access to SQL Server Express does work on a LAN.|||

"a database with same name is exist, or specified file can not be opened, or its located on UNC share"

Is one of these three your problem? Is it a file shared on a network? Is the path+filename correct? Does a database with the same name already exists?

Let's rule those out first.

|||I have encountered the same problem attempting to create a .mdf database file on a network drive. The Knowledge Base, Article ID: 304261, states that if you turn Trace flag 1807 on that you can connect to a mapped or UNC network drive. But it doesn't work, as recommended, "http://msdn2.microsoft.com/en-us/library/ms176061.aspx, using the SQL statement "Create Database MyDB ON Primary "S:\blah\blah".
It returns the error "Msg 5133, Level 16, State 1, Line 2
Directory lookup for the file "S:\colorlab\stores\_MouerMichael\TestingSQLX\MyLoc.mdf" failed with the operating system error 3(The system cannot find the path specified.)."

If I use the path "C:\blah\blah" - no problem.

Now I know the path is there and the OS finds it OK using other programs.

My goal is to move from a MSAccess DB on a network drive to a SQLExpress DB on a network drive.|||

Experiencing the same issue. I am also wishing to migrate from MSDE.

Using Microsoft SQL Server Management Studio Express I can create and populate a DB.

I wish to connect to it from VB express. However, I receive the error message that was listed in the first post in this thread.

My goal is to have SQL Server host a DB on a small network, allowing several workstations to access it concurrently.

How does one, or can one, share a DB using SQL Server Express?

Thanks in advance,

Lance

|||

I have exactly the same problem and still no answer.

Everything can be done using Microsoft SQL Server Management Studio Express

with a local or remote connection, but I can't connect to a database to create a mdf or read, populate (...) an existing database with visual studio c# express.

There is only one way to connect to an SQL server with express studios (c#, VB ...) and it's by selecting an existing mdf file on remote server and it doesn't work at all.

If someone find a solution please post.

Thanks, vax

|||

I am having the same problem. I tried setting trace flag 1807 like this:

dbcc traceon (1807,-1)

GO

But the management studio still doesn't seem to like my path (F:\) which is mapped to an NFS share. This is with SQL Server 2005 Enterprise Version.

Thanks
Eno

|||Here is what I have discovered to work.

1) Open the SQL Server Management Studio Express CTP and create a database.

2) Detach the database

3) Exit

4) Go to your language IDE of choice VB, C#, etc.

5) Create a new connection source to the DB you just created.

6) Go to the Solution Explorer and change the property "Copy to Output Directory" to 'Copy if newer'.

7) Close IDE

8) Open the SQL Server Management Studio Express CTP and reattach to the DB.

For me at least, all is well.

Lance|||

Ok, the pieces of the puzzle are finally complete. Here is what I did:

1. used the traceon flag as mentioned above

2. gave the full server name (i.e. \\server\share) and NOT the path where the share is mapped (i.e. DO NOT USE F:\share).

I got a further complication, because apparently SQL server had trouble finding the block size used on that NFS server. To deal with that I created the db on local disk first, then used DETACH/ATTACH to move the database to the NFS share. Kind of a long process but it worked. This is along the lines of the comment posted on detach/attach in this same thread chain.

Connecting to SQL server Over Internet/ Phone line etc.

Hi,
I am have an application that is running on table PC and connecting to SQL server using wireless network. But I want to be able also connected to the SQL server from other locations. Is there a way to do that? Without changing all my routines with web se
rvices? I am looking for a way for example to change basically MyConnection if possible.
Any help/ Article will be greatly appreciated
Thanks
Lisa
In order for the application to work you need to be authenticated on the
wireless network. This really has nothing to do with SQL Server.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Hi Kevin,
Well the application work in 802.11g network.. but I want now it be able to work outside the wireless network say view phone line connection or Internet. That is my question. Any help will be appreciated.
Regards
Lisa
|||Hi Lisa,
The same rules apply. If you're going to allow access via phone line,
then as long as the application can recover from a dropped line, there's no
reason why you couldn't do this. There may be some tcp parameters that you
might need to adjust to account for the slow line speed. You could also
experiment with changing the packetsize in SQL to 512.
Across the internet, you have much more bandwidth. The connection quality
and stability relies on the ISP provider.
Hope this helps
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Connecting to SQL server Over Internet/ Phone line etc.

In order for the application to work you need to be authenticated on the
wireless network. This really has nothing to do with SQL Server.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.Hi Kevin,
Well the application work in 802.11g network.. but I want now it be able to
work outside the wireless network say view phone line connection or Internet
. That is my question. Any help will be appreciated.
Regards
Lisa|||Hi Lisa,
The same rules apply. If you're going to allow access via phone line,
then as long as the application can recover from a dropped line, there's no
reason why you couldn't do this. There may be some tcp parameters that you
might need to adjust to account for the slow line speed. You could also
experiment with changing the packetsize in SQL to 512.
Across the internet, you have much more bandwidth. The connection quality
and stability relies on the ISP provider.
Hope this helps
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Friday, February 10, 2012

Connecting to SQL server 2005 from a remote machine

I'm trying to connect to a sql server machine from another machine on the network and I'm getting 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

More information about the machines:

All machines are on the same private netwrok, all in the same workgroup.

Machine1: this is the DB server, Win 2003 server, it has SQL 2005 developer edition, .Net runtime 2.0.

Machine2: trying to connect to machine 1, Win 2003 server, .Net runtime 2.0

On the DB server, TCP/IP is enabled with port 1433, also named pipes are enabled.

I checked the ERRORLOG and it says it's ready for connections and it's listening...Also there are no firewalls between the machines, I also added the sql server service .exe and the sql explorere .exe to the windows firewall exceptions on the DB server (although it's disabled)...

I'm not sure what else to do, I checked all sources online, applied anything related to this issue but not luck. This has wasted 3 hours of my time, this was a task that wouldn't take you a minute in older versions!! , Microsoft thinks it's making our life easier but in fact, I spend more time now on trouble shooting than before...

Let me know if you have a solution..

thanks,

Tamer

Case Closed :) .. turned it to be that the sql server IP address has been changed and the connection string was still pointing to the wrong one... it was confusing because of the misleading error message.

T

Connecting to SQL server 2005 express in LAN Using C# express

I tried to connect to SQL server 2005 express in LAN Using C# express

I got this msg

the file \\blablabla\\blablabla.mdf is on a network path is not supported for database file.An Attempt to attach an auto-named database for file \\blablabla\blablabla.mdf failed. a database with same name is exist, or specified file can not be opened, or its located on UNC share.

Is that mean :

I can not connect to SQL server remotly using express edition of C#

SQL server dosen't support connection in LAN

I tried to set all options like enable TCP IP connection and networks

by the way

The data has unquie name and it is located in shared folder and I can easly to connect to database like access with no problem

I will be thankful if you can help me

With the Express Edition of SQL Server you can't connect to databases over LAN. Only local database are supported.|||

Firstly Thank you very much to help me..

I read in features of sql express we can make the data in the server and shares the information with others clients. Also because sql express support web devlopment ASP that's mean the databse should be shared in the web ,, All that's mean sql server support to be in local area network !

please be sure, because I think visual C# express dosnt support client server database not sql server !

Im waiting for your comments :-)

|||I am able to connect to an instance of SQL Server Express from seperate machines on the same network using Server Management Studio Express CTP. So it appears access to SQL Server Express does work on a LAN.|||

"a database with same name is exist, or specified file can not be opened, or its located on UNC share"

Is one of these three your problem? Is it a file shared on a network? Is the path+filename correct? Does a database with the same name already exists?

Let's rule those out first.

|||I have encountered the same problem attempting to create a .mdf database file on a network drive. The Knowledge Base, Article ID: 304261, states that if you turn Trace flag 1807 on that you can connect to a mapped or UNC network drive. But it doesn't work, as recommended, "http://msdn2.microsoft.com/en-us/library/ms176061.aspx, using the SQL statement "Create Database MyDB ON Primary "S:\blah\blah".
It returns the error "Msg 5133, Level 16, State 1, Line 2
Directory lookup for the file "S:\colorlab\stores\_MouerMichael\TestingSQLX\MyLoc.mdf" failed with the operating system error 3(The system cannot find the path specified.)."

If I use the path "C:\blah\blah" - no problem.

Now I know the path is there and the OS finds it OK using other programs.

My goal is to move from a MSAccess DB on a network drive to a SQLExpress DB on a network drive.|||

Experiencing the same issue. I am also wishing to migrate from MSDE.

Using Microsoft SQL Server Management Studio Express I can create and populate a DB.

I wish to connect to it from VB express. However, I receive the error message that was listed in the first post in this thread.

My goal is to have SQL Server host a DB on a small network, allowing several workstations to access it concurrently.

How does one, or can one, share a DB using SQL Server Express?

Thanks in advance,

Lance

|||

I have exactly the same problem and still no answer.

Everything can be done using Microsoft SQL Server Management Studio Express

with a local or remote connection, but I can't connect to a database to create a mdf or read, populate (...) an existing database with visual studio c# express.

There is only one way to connect to an SQL server with express studios (c#, VB ...) and it's by selecting an existing mdf file on remote server and it doesn't work at all.

If someone find a solution please post.

Thanks, vax

|||

I am having the same problem. I tried setting trace flag 1807 like this:

dbcc traceon (1807,-1)

GO

But the management studio still doesn't seem to like my path (F:\) which is mapped to an NFS share. This is with SQL Server 2005 Enterprise Version.

Thanks
Eno

|||Here is what I have discovered to work.

1) Open the SQL Server Management Studio Express CTP and create a database.

2) Detach the database

3) Exit

4) Go to your language IDE of choice VB, C#, etc.

5) Create a new connection source to the DB you just created.

6) Go to the Solution Explorer and change the property "Copy to Output Directory" to 'Copy if newer'.

7) Close IDE

8) Open the SQL Server Management Studio Express CTP and reattach to the DB.

For me at least, all is well.

Lance|||

Ok, the pieces of the puzzle are finally complete. Here is what I did:

1. used the traceon flag as mentioned above

2. gave the full server name (i.e. \\server\share) and NOT the path where the share is mapped (i.e. DO NOT USE F:\share).

I got a further complication, because apparently SQL server had trouble finding the block size used on that NFS server. To deal with that I created the db on local disk first, then used DETACH/ATTACH to move the database to the NFS share. Kind of a long process but it worked. This is along the lines of the comment posted on detach/attach in this same thread chain.