This topic is locked

Extract database error

1/15/2007 4:45:29 AM
ASPRunnerPro General questions
M
maurello author

I haven't managed to fix the extract error yet. When I extract data from our database, first of it takes a lot of time to generate the files, and then it fails to download it (timeout?). I investigated a bit more and I found out that after a certain number of records the database generates an error:
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
What does this mean?
I tried to extract about 2000 records.

Sergey Kornilov admin 1/15/2007

Looks like a SQL Server timeout issue.
Try to put the following in the beginning of the page:

dbConnection.CommandTimeout=600
M
maurello author 1/16/2007

It does not work. Actually the server does not time out. The extract simply extract less rows and retrieves that error.
Any other idea?

Sergey Kornilov admin 1/16/2007

Obviously connection was dropped. That's why I recommended to increase connection timeout.

M
maurello author 1/17/2007

I tried again, but nothing changes. As a matter of fact, although the connection timeout is now 600 sec, the connection drops after 20-30 seconds and I retrieve an incomplete file with few rows and at the end the error message from SQL Server.
Do I have to modify something in SQL Server?

Sergey Kornilov admin 1/17/2007

Some people refer to update that needs to be installed:

http://www.microsoft.com/downloads/details...;displaylang=en
Others recommend to use IP address in connection string instead of server name.
There is some additional info from Microsoft:

http://support.microsoft.com/default.aspx?kbid=328306

Alberto 1/17/2007

Sergey, this creation is really good and we appreciate what it does for us but I feel seriously exhausted when dealing with this problem and really doubt that it is related to what we have said in here.
Now, if this is truly related to it, then the suggestions given to resolve the problem are not working so the only way to go here is find what else we can do to really fix it.
This is something we have been dragging for a very long time where I have been looking and waiting for a real solution for ever. I have been using this tool in several servers and databases and if fails in every single one when number of records selected go up a little bit. We can not control the number of records the user will be using and most of the time we are talking about several thousands.
I have changed everything you mention Sergey every time somebody claims for this but it definitely does not work. And I wonder why we cannot make it work.
The main reason why my users reject or avoid to use the screens I have done for them, with this tool, is because it does not work at the time they want to export the data so they go and try their own way of exporting and all my efforts are trashed. And they claim hard...and the credits we may get in one side we loose twice in the other one.
I have seen several other cases where the tools they use to export works perfect no errors, no slow, very solid and strong. We are not even converting values or doing formulas it is only one simple and plain select statement...
I think we should really find a solution for this.

M
maurello author 1/18/2007

I think I managed to solve the problem.
You have to modify some values in the registry of the server.
Please have a look at this links:
Understand special TCP/IP property "Keep Alive" in SQL Server 200

Description of TCP/IP settings that you may have to adjust when SQL Server connection pooling is disabled
Hope this will also help you Alberto.

Sergey Kornilov admin 1/18/2007

Alberto,
you can get better help if instead of jumping into into the middle of this thread you start a new one describing your issue with great details.

M
maurello author 1/19/2007

It looks like I solved my problem modifying two value in TCP parameters in the registry of my server.
You have to increase the TcpTimedWaitDelay to 600 for example.
It's a time-out issue I guess.

Alberto 1/19/2007

Thanks Mauro.

It looks like my comments I have posted yesterday were not liked much as they disappeared from this forum. Not the best way of doing CRM....
Ok the reality is that:

I have changed the REGISTRY OF ONE OF THE SERVERS NOW (NOT PRODUCTION)

I have added Server.ScriptTimeOut=3600 to the export.asp file
Don't remember anymore what other changes I should do but it did not work and I got same error about 2 minutes after I clicked export button to excel
It works with 16436 records with 12 columns after about 2 minutes

It works with 16992 records with 12 columns after about 2 minutes too
Thanks again
THE ERROR

The page cannot be displayed

There is a problem with the page you are trying to reach and it cannot be displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the XXX.XXX.XXX.XXX home page, and then look for links to the information you want.

Click the Refresh button, or try again later.

Click Search to look for information on the Internet.

You can also see a list of related sites.

HTTP 500 - Internal server error

Internet Explorer

Sergey Kornilov admin 1/21/2007

Alberto,
your posts will be deleted if you don't listen to forum's admin.
Start a new topic with your problem description.

Turn off "Friendly HTTP error messages" in Internet Explorer to print the actual error message and post this message.
Even if you believe that your problem is exactly the same you didn't provide any info that I can use to help you.

M
maurello author 1/22/2007

Alberto, it looks to me that now the extract works for the database server. However, I think now IIS times out. You should set the ASP Script time out also in IIS for your website. Increase it to 600 for example and try again. I also got the same problem.

M
maurello author 2/1/2007

I think I solved the connection timeout once for all.
I included in my connection string to SQL Server "connect timeout=0".
Now the only timeout is the script timeout specified in the *_extract.asp files generated by ASP Runner. I would be actually very nice to be able to modify that value in ASP Runner without having to modify everything manually.

Sergey Kornilov admin 2/1/2007

Mauro,
you can add a line to C:\Program files\ASPRunnerPro4.1\source\export.asp to change script timeout.

You just need to do this once.

Alberto 2/12/2007

Thanks Mauro, I have tryied your recomendations and there is a good progress. We are very close...

I opened a new topic as Sergey requested http://www.asprunner.com/forums/index.php?showtopic=4596
Thanks