StartTransaction, Commit and Rollback on SQL Server Profiler

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jan.javurek@floresps.cz
Posts: 20
Joined: Fri 29 Jan 2010 10:05
Contact:

StartTransaction, Commit and Rollback on SQL Server Profiler

Post by jan.javurek@floresps.cz » Fri 23 Apr 2010 15:51

CZ:
Jak mám nastavit profiler, aby se v něm zobrazovali události StartTransaction, Commit a Rollback volané z SDAC TMSConnection?

Příkazy ne jsou standardně vidět jako TSQL.

Děkuji za odpověď.

EN:
How do I set the MSSQL profiler to it depicted events StartTransaction, Commit and Rollback called from SDAC TMSConnection?

Commands are not normally seen as TSQL.

Thank you for your reply.

Log profiler:

Audit Login -- network protocol: LPC
set quoted_identifier on
set arithabort off
set numeric_roundabort off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set cursor_close_on_commit off
set implicit_transactions off
set language us_english
set dateformat mdy
set datefirst 7
set transaction isolation level read committed
Project1.exe jan.javurek QGIRIT\jan.javurek 6400 56 2010-04-23 17:45:34.020
SQL:BatchStarting SET LOCK_TIMEOUT 2000 Project1.exe jan.javurek QGIRIT\jan.javurek 6400 56 2010-04-23 17:45:34.020
SQL:BatchCompleted SET LOCK_TIMEOUT 2000 Project1.exe jan.javurek QGIRIT\jan.javurek 0 0 0 0 6400 56 2010-04-23 17:45:34.020 2010-04-23 17:45:34.020
SQL:BatchStarting SET NO_BROWSETABLE ON Project1.exe jan.javurek QGIRIT\jan.javurek 6400 56 2010-04-23 17:45:34.023
SQL:BatchCompleted SET NO_BROWSETABLE ON Project1.exe jan.javurek QGIRIT\jan.javurek 0 0 0 0 6400 56 2010-04-23 17:45:34.023 2010-04-23 17:45:34.023
SQL:BatchStarting SELECT * FROM StoreCards Project1.exe jan.javurek QGIRIT\jan.javurek 6400 56 2010-04-23 17:45:34.023
SQL:BatchCompleted SELECT * FROM StoreCards Project1.exe jan.javurek QGIRIT\jan.javurek 0 7 0 9 6400 56 2010-04-23 17:45:34.023 2010-04-23 17:45:34.030
SQL:BatchStarting SELECT * FROM Firms Project1.exe jan.javurek QGIRIT\jan.javurek 6400 56 2010-04-23 17:45:34.037
SQL:BatchCompleted SELECT * FROM Firms Project1.exe jan.javurek QGIRIT\jan.javurek 0 28 0 26 6400 56 2010-04-23 17:45:34.037 2010-04-23 17:45:34.063
Audit Logout Project1.exe jan.javurek QGIRIT\jan.javurek 0 35 0 50 6400 56 2010-04-23 17:45:34.020 2010-04-23 17:45:34.070
Trace Stop 2010-04-23 17:45:41.957

Delphi code:

var
MSConnection: TMSConnection;
Query: TMSQuery;
begin
MSConnection:= TMSConnection.Create(nil);
Query := TMSQuery.Create(nil);
try
MSConnection.Database := EdDatabase.Text;
MSConnection.Authentication := auWindows;
MSConnection.Server := EdServer.Text;
MSConnection.Connect;

Query.Connection := MSConnection;
Query.SQL.Text := 'SELECT * FROM StoreCards';
Query.Execute;

MSConnection.StartTransaction;
try
Query.SQL.Text := 'SELECT * FROM Firms';
Query.Execute;
MSConnection.Commit;
except
MSConnection.Rollback;
end;
finally
Query.Close;
Query.Free;
MSConnection.Disconnect;
MSConnection.Free;
end;
end;

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 26 Apr 2010 09:34

To solve the problem you should change a template to shown events with transactions via the File->Templates->Edit template menu.

waleeed1
Posts: 1
Joined: Mon 22 Feb 2016 11:01

Re: StartTransaction, Commit and Rollback on SQL Server Profiler

Post by waleeed1 » Mon 22 Feb 2016 11:03

Project1.exe jan.javurek QGIRIT\jan.javurek 6400 56 2010-04-23 17:45:34.020
SQL:BatchStarting SET LOCK_TIMEOUT 2000 Project1.exe jan.javurek QGIRIT\jan.javurek 6400 56 2010-04-23 17:45:34.020

_________________________
== Solitaire ==
Last edited by waleeed1 on Tue 01 Mar 2016 06:50, edited 1 time in total.

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: StartTransaction, Commit and Rollback on SQL Server Profiler

Post by azyk » Tue 23 Feb 2016 05:30

Please clarify the issue. If you have a simple test sample reproducing the problem, please send it to us.

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: StartTransaction, Commit and Rollback on SQL Server Profiler

Post by azyk » Tue 23 Feb 2016 05:30

Please clarify the issue. If you have a simple test sample reproducing the problem, please send it to us.

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: StartTransaction, Commit and Rollback on SQL Server Profiler

Post by azyk » Tue 23 Feb 2016 05:30

Please clarify the issue. If you have a simple test sample reproducing the problem, please send it to us.

Post Reply