Wednesday, March 7, 2012
Connection error while already running code
I am using an ODBC connection and TCP/IP
After I have connected, I use ADO to run a process that gets ten different
sum queries from various SQL Server tables and writes the results to local
Access table. This loops thru 300 to 800 records.
The second time thru this process, at any of the queries, I will almost
always get this error:
-2147467259, Sql Server does not exist or access denied. Now I am already
connected and I have run this same query many times.
If I debug and force the same line, it runs.
Why is it hanging occasionally, and more importantly, what can I do to fix
this?
TIA,
MikeCould be that the problem is timing related. What happens if you insert a
timer event to wait a few seconds prior to establishing a new connection?
What is the connection timeout setting? How many concurrent connections
are on the server when this happens?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Kevin,
I am not establishing a new connection, I am using one that is already open.
The connection timeout is the default, 30 seconds.
The concurrent connection fluctuates between 159 and 175.
Hope this helps.
Mike
"Kevin McDonnell [MSFT]" <kevmc@.online.microsoft.com> wrote in message
news:dzu1LfLVEHA.2764@.cpmsftngxa10.phx.gbl...
> Could be that the problem is timing related. What happens if you insert a
> timer event to wait a few seconds prior to establishing a new connection?
> What is the connection timeout setting? How many concurrent connections
> are on the server when this happens?
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Connection error while already running code
I am using an ODBC connection and TCP/IP
After I have connected, I use ADO to run a process that gets ten different
sum queries from various SQL Server tables and writes the results to local
Access table. This loops thru 300 to 800 records.
The second time thru this process, at any of the queries, I will almost
always get this error:
-2147467259, Sql Server does not exist or access denied. Now I am already
connected and I have run this same query many times.
If I debug and force the same line, it runs.
Why is it hanging occasionally, and more importantly, what can I do to fix
this?
TIA,
Mike
Could be that the problem is timing related. What happens if you insert a
timer event to wait a few seconds prior to establishing a new connection?
What is the connection timeout setting? How many concurrent connections
are on the server when this happens?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Kevin,
I am not establishing a new connection, I am using one that is already open.
The connection timeout is the default, 30 seconds.
The concurrent connection fluctuates between 159 and 175.
Hope this helps.
Mike
"Kevin McDonnell [MSFT]" <kevmc@.online.microsoft.com> wrote in message
news:dzu1LfLVEHA.2764@.cpmsftngxa10.phx.gbl...
> Could be that the problem is timing related. What happens if you insert a
> timer event to wait a few seconds prior to establishing a new connection?
> What is the connection timeout setting? How many concurrent connections
> are on the server when this happens?
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Saturday, February 25, 2012
connection error
Hi
I am getting following error while connecting in sql server. i have already disabled firewall, enabled remote connections using pipe and tcp and made sure the sql server and sql browser services are running.
but still the problem persists...can any help me ?
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.
thanks in advance
Do you have a named instacne or a default one ? how are you connecting, you will have to provide some more information on your situation to make it easier forus to give you the right suggestions.Jens K. Suessmeyer
http://www.sqlserver2005.de
Connection Error
Error Message:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
The error occurs in Visual Studio 2005 v 8.0.50725.42. I have my string in my web.config file. In Visual Studio it doesn't work. When you upload the page it connects and shows the data. Now, I have been several places and been asked, "So what's the issue?" The problem is that I want Visual Studio 2005 to connect so that I can use it to create Gridviews, use the Server Explorer and so on.
Is there an upgrade to VS2005? Is this a known bug? Is there a work-around - a configuration that needs to be setup in the web.config file? I've only just begun my .NET 2.0 experience so type slow and use small words...
Thanks!
I suppouse you are talking about connection string for a database ?, I think you should try this questions in forums about general development or data access, and also give more info about how are you making the connection string, if you are using the "connectionStrings" section and so on.
This forum is only related to Team System and TFS issues, sorry.
Friday, February 24, 2012
Connection Broken
Sometimes the connection may get broken, for example with laptop users.
What is the most efficient way of detecting when this happens, instead of
the string of sql errors that we get.You either implement this through your own "sanity db class" with
sending a trivial command like "Select 'Sanity Check'" to SQL Server
and doing this in a try catch block, or you wrap the command you are
trying to send in a try catch block and retry upon the specific error
class for a lost connection.
Jens K. Suessmeyer.
http://www.sqlserver2005.de
--|||Hello,
Mostly this should be because of some network issues. See if your network is
persistent..Run a ping from one of the laptop to sql server and redirect to
text file
and see if there is any request time-out..
Thanks
Hari
"Michael Tissington" <mtissington@.newsgroups.nospam> wrote in message
news:%231OsvqFoHHA.208@.TK2MSFTNGP05.phx.gbl...
>I have developed on application that connects to a sql database using
>tcp/ip
> Sometimes the connection may get broken, for example with laptop users.
> What is the most efficient way of detecting when this happens, instead of
> the string of sql errors that we get.|||There are several Framework classes that can be called to see if the Network
changes state (which kills a connection) or you can use others to see if the
SQL Server instance is still responding. Yes, it sounds like there are
network hardware (or throughput/capacity) issues.
____________________________________
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)
----
---
"Michael Tissington" <mtissington@.newsgroups.nospam> wrote in message
news:%231OsvqFoHHA.208@.TK2MSFTNGP05.phx.gbl...
>I have developed on application that connects to a sql database using
>tcp/ip
> Sometimes the connection may get broken, for example with laptop users.
> What is the most efficient way of detecting when this happens, instead of
> the string of sql errors that we get.
Connection Broken
Sometimes the connection may get broken, for example with laptop users.
What is the most efficient way of detecting when this happens, instead of
the string of sql errors that we get.
Hello,
Mostly this should be because of some network issues. See if your network is
persistent..Run a ping from one of the laptop to sql server and redirect to
text file
and see if there is any request time-out..
Thanks
Hari
"Michael Tissington" <mtissington@.newsgroups.nospam> wrote in message
news:%231OsvqFoHHA.208@.TK2MSFTNGP05.phx.gbl...
>I have developed on application that connects to a sql database using
>tcp/ip
> Sometimes the connection may get broken, for example with laptop users.
> What is the most efficient way of detecting when this happens, instead of
> the string of sql errors that we get.
|||There are several Framework classes that can be called to see if the Network
changes state (which kills a connection) or you can use others to see if the
SQL Server instance is still responding. Yes, it sounds like there are
network hardware (or throughput/capacity) issues.
____________________________________
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)
------
"Michael Tissington" <mtissington@.newsgroups.nospam> wrote in message
news:%231OsvqFoHHA.208@.TK2MSFTNGP05.phx.gbl...
>I have developed on application that connects to a sql database using
>tcp/ip
> Sometimes the connection may get broken, for example with laptop users.
> What is the most efficient way of detecting when this happens, instead of
> the string of sql errors that we get.