Subject | transaction "gap" |
---|---|
Author | Raith, Daniel |
Post date | 2008-03-17T20:23:40Z |
Obviously this is bad. ~120000 difference between OAT and Next
Transaction. I was reading in "The Firebird Book" something about the
difference between hard and soft committed transactions. What does that
mean?
Database header page information:
Flags 0
Checksum 12345
Generation 199698
Page size 4096
ODS version 10.1
Oldest transaction 57333
Oldest active 57334
Oldest snapshot 57333
Next transaction 199690
Bumped transaction 1
Sequence number 0
Next attachment ID 0
Implementation ID 16
Shadow count 0
Page buffers 0
Next header page 0
Database dialect 3
Creation date Mar 15, 2008 1:00:23
Attributes force write
I'm using Delphi 7, dbexpress, and the upscene driver to access Firebird
1.5.3. The database in question gathers information from a webservice
and there is a reporting program that reports usage statistics on the
data back through the webservice. So it's only insert and select
statements from a webservice. Typical code structure looks something
like this. Is this explicit transaction control not committing the
transactions somehow?
sqlDataSet := TSQLDataSet.Create( nil );
try
sqlDataSet.SQLConnection :=
Global_FBConnectionBroker.GetAvailableDatabaseConnection;
sqlDataSet.CommandText := 'insert blah';
TransDesc.TransactionID := GetRandomNumber;
TransDesc.IsolationLevel := xilREPEATABLEREAD;
sqlDataSet.SQLConnection.StartTransaction( TransDesc );
try
sqlDataSet.ExecSQL;
sqlDataSet.SQLConnection.Commit( TransDesc );
except on E:Exception do
begin
OutputFmtDebugMessage( 'inserting blah caused: %s (%s)',
[E.Message, kCRLF + sqlDataSet.CommandText, kCRLF + ConvertParamsToText(
sqlDataSet )] );
sqlDataSet.SQLConnection.RollBack( TransDesc );
end;
end;
finally
Global_FBConnectionBroker.ReleaseConnection(
sqlDataSet.SQLConnection );
FreeAndNil( sqlDataSet );
end;
Daniel Raith
Software Development Engineer
FSC Insurance Solutions
A Fiserv Business Unit - NASDAQ (FISV)
715-287-3225 Ext 144
Fax: 715-287-4576
www.mi-assistant.com <http://www.mi-assistant.com/>
26550 W. Mondovi St.
Eleva, WI 54738
Notice: The integrity and security of this message cannot be guaranteed
on the Internet. This email and any files transmitted with it are
confidential and intended solely for the use of the individual or entity
to whom they are addressed. If you have received this email in error
please notify the system manager. Please note that any views or
opinions presented in this email are solely those of the author and do
not necessarily represent those of FSC Insurance Solutions.
[Non-text portions of this message have been removed]
Transaction. I was reading in "The Firebird Book" something about the
difference between hard and soft committed transactions. What does that
mean?
Database header page information:
Flags 0
Checksum 12345
Generation 199698
Page size 4096
ODS version 10.1
Oldest transaction 57333
Oldest active 57334
Oldest snapshot 57333
Next transaction 199690
Bumped transaction 1
Sequence number 0
Next attachment ID 0
Implementation ID 16
Shadow count 0
Page buffers 0
Next header page 0
Database dialect 3
Creation date Mar 15, 2008 1:00:23
Attributes force write
I'm using Delphi 7, dbexpress, and the upscene driver to access Firebird
1.5.3. The database in question gathers information from a webservice
and there is a reporting program that reports usage statistics on the
data back through the webservice. So it's only insert and select
statements from a webservice. Typical code structure looks something
like this. Is this explicit transaction control not committing the
transactions somehow?
sqlDataSet := TSQLDataSet.Create( nil );
try
sqlDataSet.SQLConnection :=
Global_FBConnectionBroker.GetAvailableDatabaseConnection;
sqlDataSet.CommandText := 'insert blah';
TransDesc.TransactionID := GetRandomNumber;
TransDesc.IsolationLevel := xilREPEATABLEREAD;
sqlDataSet.SQLConnection.StartTransaction( TransDesc );
try
sqlDataSet.ExecSQL;
sqlDataSet.SQLConnection.Commit( TransDesc );
except on E:Exception do
begin
OutputFmtDebugMessage( 'inserting blah caused: %s (%s)',
[E.Message, kCRLF + sqlDataSet.CommandText, kCRLF + ConvertParamsToText(
sqlDataSet )] );
sqlDataSet.SQLConnection.RollBack( TransDesc );
end;
end;
finally
Global_FBConnectionBroker.ReleaseConnection(
sqlDataSet.SQLConnection );
FreeAndNil( sqlDataSet );
end;
Daniel Raith
Software Development Engineer
FSC Insurance Solutions
A Fiserv Business Unit - NASDAQ (FISV)
715-287-3225 Ext 144
Fax: 715-287-4576
www.mi-assistant.com <http://www.mi-assistant.com/>
26550 W. Mondovi St.
Eleva, WI 54738
Notice: The integrity and security of this message cannot be guaranteed
on the Internet. This email and any files transmitted with it are
confidential and intended solely for the use of the individual or entity
to whom they are addressed. If you have received this email in error
please notify the system manager. Please note that any views or
opinions presented in this email are solely those of the author and do
not necessarily represent those of FSC Insurance Solutions.
[Non-text portions of this message have been removed]