473,382 Members | 1,225 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

sql server 2005 transaction problem(sql server experts this question for you :))

5
Hi Everybody,

I have a web application that makes large number of insertions and updates in DB. In this application I send a sql query which is sql transaction shown below. The problem is that SOMETIMES one of tables naming 'AimD' has no record although table 'AimB' has a record.But according to transaction it must HAVE. A very important consideration is that the table 'AimD' is getting 1 million records everyday and approximately 1 to 7 records leak in this way for every 1 million records.
In your opinion what causes this transaction break down? and why does sql server not make rollback?

SET XACT_ABORT ON BEGIN TRY BEGIN TRANSACTION declare @BId INT,@manager varchar(8),@saha varchar(8),@personx varchar(16),@operation varchar(8)

if not exists(select Id from AimB where CariKod = 'L1520310009' and AyNo = 1)
Begin
insert AimB (CariKod,AyNo,KulId) values ('L1520310009',1,724)
select @BId = IDENT_CURRENT ('AimB')
select @manager = manager,@saha = Saha,@personx = personx,@operation = operation from ChangeDimentionCari with (nolock) where SubeKodu = 'L1520310009'
insert AimKodlar (BId,Donem,managerKodu,SahaKodu,personxKodu,operat ionKodu) values (@BId,1,@manager,@saha,@personx,@operation)
insert AimD (BId,StokKodu, Aim,ListPrice) values ( @BId,'01100110005',0,dbo.[fn_ListPrice]('L1520310009','01100110005'))
-- .......
--There are about 270 insertions into AimD table
End

COMMIT TRANSACTION END TRY BEGIN CATCH ROLLBACK TRANSACTION END CATCH


thanks for your replies in advance.
Jan 22 '08 #1
1 1030
alenak
5
the problem has been solved
Feb 4 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: F. GEIGER | last post by:
I've troubles to let my app take off using pysqlite. What I wonder most for now is that "pysqlite2.dbapi2.OperationalError: cannot commit transaction - SQL statements in progress" when I do this:...
1
by: Fredy Ramirez | last post by:
Hi, I have a question about transactions. I am developing a Postgresql client. If I start a transaction in a Postgresql client code, and in this process a trigger is executed. Are all the...
12
by: John Sidney-Woollett | last post by:
I have to convert an java web application currently using an Oracle DB back end to one using a Postgres backend. In Oracle much of the application logic is abstracted away from the java...
0
by: Ken North | last post by:
Michael Rys of Microsoft discusses SQL Server 2005, indexing techniques for XML, T-SQL extensions, .NET assemblies and XQuery Streaming video, running time 15:01...
3
by: Andrew Chanter | last post by:
I have a long and complex data manipulation algorithm written in ADO that performs about 20 different data manipulation processes sequentially. I intend to finalise this function (lets call it...
2
by: farseer | last post by:
Hi, I have SQL Server 2005 installed on my dev system. I am working on an app that i would like to distribute SQL Server with. SQL Server EXpress edition seem to be ideal for this. My questions...
1
by: emsik1001 | last post by:
Hi Everyone I'm trying to connect to a server using SQL Server Management studio but I have an error message saying "an error has occurred while establishing a connection to the server" error...
1
by: JamesHumphries | last post by:
I am using classic ASP and SQL server 2005. I am looking to incorporate some kind of report viewer into my site to report data queried directly from SQL. This will not be a prewritten report...
3
by: ms | last post by:
Hi, I used SqlTransaction to insert datas to table A in my program ,but I find that before I commit the transaction ,I even can not use query analyzer to query data in table A, could anybody tell...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.