Re: Error -2147168227 Cannot create new transaction because capacity was exceeded.

From: Val Mazur (group51a_at_hotmail.com)
Date: 08/06/04


Date: Thu, 5 Aug 2004 22:17:32 -0400

Hi Doug,

Try to run SQL profiler, which ships with SQL Server to see how many
connections opened in your application. Are you sure that you closing
connections properly?

-- 
Val Mazur
Microsoft MVP
"Doug Stoltz" <NoSpam@MyEmail.com> wrote in message 
news:eySsLGmeEHA.2396@TK2MSFTNGP11.phx.gbl...
> Thanks for the response.
>
> No, I'm not using nested transactions.  I'm specifically, trying to avoid
> that in my code.  Basically, I've got a wrapper class on the ADO 
> connection
> object and there is only 1 instance per application of the connection
> object. The wrapper class checks a boolean to see if there is a 
> transaction
> started on the connection object.  Provided the coding works it should
> prevent nested transactions.  I've done some SQL traces to check this out.
> But I may have overlooked something.
>
> I'll recheck again and look for this. Thanks for the tip.
>
> FYI, I'm suspecting that resource pooling may be causing this. So I'm 
> using
> the "OLE DB Services = -4" setting to disable pooling and auto enlistment.
> In addition, I've added code to set the connection = nothing before I 
> close
> the recordset. Prior to that I've just closed the ADO recordset object.
>
> The problem is intermittant but I can force this error to happen by NOT
> closing recordsets. What I'm hoping to determine is the true cause of the
> problem. Is it (a) too many open recordsets on the client (b) connection
> pooling is not freeing resouces on the client or (c) some other 
> explanation?
>
> Your input is appreciated...
>
> Doug
>
>
> "Val Mazur" <group51a@hotmail.com> wrote in message
> news:eZ2tfbdeEHA.3732@TK2MSFTNGP11.phx.gbl...
>> Hi Doug,
>>
>> Do you have nested transactions? If yes, then you cannot do this through
>> OLEDB provider for SQL Server. It supports only one level. How do you
>> declare, open and close connections? Could you post code here?
>>
>> -- 
>> Val Mazur
>> Microsoft MVP
>>
>>
>> "Doug Stoltz" <NoSpam@MyEmail.com> wrote in message
>> news:%23Z4QKbMeEHA.3512@TK2MSFTNGP12.phx.gbl...
>> > If you have some information on this error please reply.
>> >
>> > I have been unable to find info in the Knowledge base, ADO or SQL 
>> > Server
>> > doc
>> > on error -2147168227.  I have even run searches on the error text at 
>> > the
>> > MSDN site and in the master.sysmessages table on my server. Google
>> > searches
>> > have turned up little too. If you have info on this, please tell me how
>> > you
>> > found it.
>> >
>> > The application is VB 6, ADO, using OLE DB  provider (SQLOLEDB)  and
> MDAC
>> > 2.8, and the database is SQL 2000 on an NT 4 Server machine.
>> >
>> > I've debugged the error to a call to:  ado.BeginTrans.
>> >
>> > 1) Can you tell me is this a client side ADO error or server side SQL
>> > Server
>> > 2000 error?
>> >
>> > 2) Where can I find the error message info in the KB?
>> >
>> > 3) When I look at the Process Info in enterprise manager there are
>> > multiple
>> > process Id's generated by the application.  My gut is telling me that I
>> > have
>> > too many process id's created by the ADO driver on the client side and
> the
>> > ADO driver generates the error.  (Does this sound right to you?)
>> >
>> > 3b) I'm familair with SQL profiler and my research is pointing me back
> to
>> > the ADO driver. Do you have a suggestion to "prove"  its a driver side
>> > problem?  Or does the error code indicate which service generated the
>> > error?
>> >
>> > 4) It seems to me that the ADO driver is deciding to create multiple
>> > connections (process id's) and is not closing them the same way as 
>> > prior
>> > versions.  Do you know if there has been any change in this part of the
>> > ADO
>> > code?  Do you have any ideas how I might research this part of my
>> > question?
>> > Is there a blog somewhere that I can speak to ADO developers at
> microsoft?
>> >
>> > Background
>> > This behavior started happening about the time I upgraded to Crystal 10
>> > and
>> > installed the latest MDAC.  Some of the offending code has been
> "tweaked"
>> > to
>> > explicitly call the "close" method on recordset objects and this has
>> > helped.
>> > In addition, I can see the connection property "multiple connections" =
>> > true; Even though I'd like to limit the driver to opening only 1
>> > connection.
>> >
>> > Cheers
>> > You can email direct to dstoltz at coop-tech dot com.
>> > (email address scrambled to thwart spammers)
>> >
>> >
>> >
>> >
>>
>>
>
> 


Relevant Pages

  • Re: Connection issues between .Net framwok and SQl Express 2005
    ... You will no longer need the database MDF file name in the connection string. ... simply attach the ASPNETDB.mdf to SQL Server permenantly, ... as USER INSTANCE on existing SQL Server Express, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Performance of ODBC
    ... if you have a software firewall; forward 1433/1434 to your server ... I've now created my own server with SQL Server 2005 Express, ... glitch concerns the Upsizing Wizard. ... I originally set up my ODBC connection via ...
    (microsoft.public.access.adp.sqlserver)
  • SQL 2005 Express and VS .Net 2003 wizard error More options
    ... Open the server explorer panel ... Go to the Provider tab and select SQL NAtive Client (DON'T use oledb ... Go back to the Connection tab and carry on setting up the connection ... I have installed Visual Studio 2005 Professional and then Visual Studio ...
    (microsoft.public.sqlserver)
  • Re: Timeout problem with SS2K, VS03
    ... I noticed calls in sql profiler: ... This is the server side debug stored procedure. ... a timeout issue that I cannot identify the source of. ... transaction is committed and the connection is closed cleanly and all ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cross Transactions between ADO & ADO.Net
    ... connection--it thrashes the server unnecessarily and discards useful server ... goes away and quietly reopen the connection when they return. ... > DTC transactions are not only heavy, they might also cause deadlocks due ... We even call ADO ...
    (microsoft.public.dotnet.framework.adonet)