Showing posts with label odbc. Show all posts
Showing posts with label odbc. Show all posts

Wednesday, March 21, 2012

Non-Paged Memory leak

One of our application which uses ODBC to access SQL2000
Sp3 database (on the same machine) is leaking Non-paged
Pool memory (continuously). Can this be due to ODBC driver
problem as reported in article "814410 FIX"?
THis is happening only on few machines (SQL2000 Sp3 on
Win2K advanced Server Sp4).
Will SQL2000 Sp3a solve this problem?
I am not able to consistantly see the problem.
We observed NonPaged leak on Task Monitor after we saw
error with Event id 2019 in an event log of a machine
earlier.Dinesh
SP3a does contain a fix for 814410. See:
http://support.microsoft.com/?kbid=306908
Hope this helps.
Sal Terillo
"Dinesh" <dineshks@.infosys.com> wrote in message
news:0ac301c3617b$25682600$a501280a@.phx.gbl...
> One of our application which uses ODBC to access SQL2000
> Sp3 database (on the same machine) is leaking Non-paged
> Pool memory (continuously). Can this be due to ODBC driver
> problem as reported in article "814410 FIX"?
> THis is happening only on few machines (SQL2000 Sp3 on
> Win2K advanced Server Sp4).
> Will SQL2000 Sp3a solve this problem?
> I am not able to consistantly see the problem.
> We observed NonPaged leak on Task Monitor after we saw
> error with Event id 2019 in an event log of a machine
> earlier.
>sql

Friday, March 9, 2012

Non blocking query on a table in SQL Server 2000

Hi Folks,
How can I invoke a non blocking ODBC query on a table in a SQL Server
database. Our current design requires the method invoking the query to
'return' immediately after invoking the query. The results of the query
should be put in a globally accessible location.
I think SQLFetch is a blocking call.
Thanks,
Vishal
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!Vishal,
You have to use muliple threads. It is SQL Execute that usually takes
long time, not SQLFetch(). A call to single SQLFetch usually does not
take long unless you have some network connection problem.
Here is what you can do:
From your main application thread spawn a new one that does
SQLExecute(). The same spawned thread will call SQLFetch and put the
result in a shared buffer, possibly a global to you app. Then send a
Window message to you application notifying it that some data has be put
in the buffer. Read this data from your primary thread.
Regards,
Elvis
Dead not so long ago.
Vishal Prabhu wrote:
quote:

> Hi Folks,
> How can I invoke a non blocking ODBC query on a table in a SQL Server
> database. Our current design requires the method invoking the query to
> 'return' immediately after invoking the query. The results of the query
> should be put in a globally accessible location.
> I think SQLFetch is a blocking call.
> Thanks,
> Vishal
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!

Non blocking query call

Hi Folks,
How can I invoke a non blocking ODBC query on a table in a SQL Server
database. Our current design requires the method invoking the query to
'return' immediately after invoking the query. The results of the
query should be put in a globally accessible location.
I think SQLFetch is a blocking call.
Thanks,
VishalWhat you are looking for is called Asynchronous Execution. You must enable
async using SQLSetConnectAttr() and SQL_ATTR_ASYNC_ENABLE.
ODBC APIs will return SQL_STILL_EXECUTING while the operation is still
pending. Once the operation completes, the API will return something other
than SQL_STILL_EXECUTING (SQL_SUCCESS if the operation succeeded, etc).
The async model exposed by ODBC is a Poll model, where you have to
periodically poll for completion (instead of a Notification model, where you
are notified that the operation completed).
Brannon Jones
Developer - MDAC
This posting is provided "as is" with no warranties and confers no rights.
"Vishal Prabhu" <vprabhu@.uci.edu> wrote in message
news:31cf0289.0312191118.4354c4fd@.posting.google.com...
quote:

> Hi Folks,
> How can I invoke a non blocking ODBC query on a table in a SQL Server
> database. Our current design requires the method invoking the query to
> 'return' immediately after invoking the query. The results of the
> query should be put in a globally accessible location.
> I think SQLFetch is a blocking call.
> Thanks,
> Vishal