PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > DBCC OPENTRAN vs. Open Transactions column in Activity Monitor
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
DBCC OPENTRAN vs. Open Transactions column in Activity Monitor

Réponse
 
LinkBack Outils de la discussion
Vieux 12/09/2008, 17h29   #1
kevinkilmerchoi@hotmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut DBCC OPENTRAN vs. Open Transactions column in Activity Monitor

SQLServer 2005 version 9.00.1399.06

I am seeing what appears to be a discrepancy between DBCC OPENTRAN and
the SQLServer2005 Activity Monitor window.

In the activity monitor, there are processes that show a value >=1 in
the Open Transactions column, but DBCC OPENTRAN (run on the db that
these processes are connected to) shows 'no active open
transactions'. These open transactions are not 'fleeting' - they hang
around for a while, so it's not a simple case of timing.

Is this normal? What circumstances would explain this behavior?

I have found only one post (unanswered) on a similar topic:
http://groups.google.com/group/micro...7fe81174c43e51.

Any would be greatly appreciated.

Regards,
Kevin
  Réponse avec citation
Vieux 12/09/2008, 18h53   #2
Rubén Garrigós
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: DBCC OPENTRAN vs. Open Transactions column in Activity Monitor

Hi Kevin,

I guess the problem is that you have open transaciont without log activity.
Let me show you an example. You need two connections to your database.

On the first one run this code in three parts. First until STOP HERE
comment, then until STOP HERE AGAIN comment and then finish the rest of the
script.

-- Start of script
use tempdb;

create table #test (a int);

begin tran;
-- Query the table
select * from #test;
-- STOP HERE and run the script on the other connection
-- Check that "DBCC OPENTRAN" shows "No active open transactions."
-- Check that sp_MSget_current_activity returns an open transaction on the
current @@spid

-- Insert something
insert into #test values (1);

-- STOP HERE AGAIN and run the script on the other window
-- Check that "DBCC OPENTRAN" now returns the open transaction

rollback tran;
drop table #test;
-- End of script

On the other connection run this code each time you stop on the first script:

-- Start of script
declare @id int;
exec sp_MSset_current_activity @id;
exec sp_MSget_current_activity @@spid,1;
DBCC OPENTRAN
-- End of script
You can deduct that DBCC OPENTRAN only shows you current transactions that
have written data into the transaction log

Rubén Garrigós
Solid Quality Mentors

"kevinkilmerchoi@hotmail.com" wrote:

> SQLServer 2005 version 9.00.1399.06
>
> I am seeing what appears to be a discrepancy between DBCC OPENTRAN and
> the SQLServer2005 Activity Monitor window.
>
> In the activity monitor, there are processes that show a value >=1 in
> the Open Transactions column, but DBCC OPENTRAN (run on the db that
> these processes are connected to) shows 'no active open
> transactions'. These open transactions are not 'fleeting' - they hang
> around for a while, so it's not a simple case of timing.
>
> Is this normal? What circumstances would explain this behavior?
>
> I have found only one post (unanswered) on a similar topic:
> http://groups.google.com/group/micro...7fe81174c43e51.
>
> Any would be greatly appreciated.
>
> Regards,
> Kevin
>

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 06h03.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08070 seconds with 10 queries