exec sp_reset_connection

Posts   
 
    
ivanc
User
Posts: 36
Joined: 29-Apr-2004
# Posted on: 26-Jul-2005 17:06:26   

After the first commit transaction since the application was started before each query or stored procedure call an line like this appears in the Profiler

 exec sp_reset_connection

The whole thing looks something like this:

 exec sp_reset_connection
go
exec sp_executesql N'SELECT dbo.dktDokument_Statusi.* FROM dbo.dktDokument_Statusi  WHERE ( dbo.dktDokument_Statusi.Dkm_Id = @Dkm_Id1 And dbo.dktDokument_Statusi.Vazeci = @Vazeci2)', N'@Dkm_Id1 decimal(15,0),@Vazeci2 bit', @Dkm_Id1 = 522, @Vazeci2 = 1
go
exec sp_reset_connection
go
exec sp_executesql N'SELECT dbo.dkvPonuda_Stavke.* FROM dbo.dkvPonuda_Stavke  WHERE ( dbo.dkvPonuda_Stavke.Dokumenti_Id = @Dokumenti_Id1) ORDER BY dbo.dkvPonuda_Stavke.Dokument_Stavke_Id ASC', N'@Dokumenti_Id1 decimal(15,0)', @Dokumenti_Id1 = 522
go

I have tried to close the connection after each commit, to not close connection after each commit, dispose adapter, crate new... about everything and nothing seems to help.

Is it a performance issuse? Seems it it not, but I don't like seeing it there. Is there a way to avoid ti?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 26-Jul-2005 18:32:15   

more than one transaction can be run over an open connection, and after each commit/rollback I think the provider decides to reset the connection to be sure it starts with a clean slate.

It's done by SqlClient, I have no control over it.

Frans Bouma | Lead developer LLBLGen Pro