Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS SQL skipping DB writes?

Status
Not open for further replies.

panini

MIS
Jun 1, 2001
136
GB
SOS!

My SQL 2000 server is appearing to miss some UPDATE statements - or sections of update statements out so the orders that I'm writing to my databases are not complete... - i'm getting no errors and if i add another update in to test the code it works fine.

We have increased the load on the server recently - but have never seen anything like this before - has anyone else seen anything like this?

Many thanks,
 
panini,
You are going to have to provide us a lot more information than that if we are going to help you. SQL Server does not just randomly skip over transactions. I would suggest you run profiler while your update is running. You may have an error in your SQL and the transaction is rolling back.


- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
hi ptheriault,

when ever i run profiler it locks the whole server up - i think maybe i'm asking it to profile too many processes...

I know that sql shouldn't randomly skip transactions - but i have an insert statement that works fine in query analyser, yet it misses 2 of the variables out when it runs in the script.

If I separate out the specific variables its missing and add another insert statement immediately afterwards it works fine....

In another situation it just misses whole UPDATE statements out - I'm writing them to a log file immediately afterwards and can see what's being missed....
 
>>when ever i run profiler it locks the whole server up - i think maybe i'm asking it to profile too many processes...

Never run profiler from the server. Run it from your local PC or a test server that has the SQL Client tools installed. Profiler will consume a lot of resources.

Post your scripts so we can see what it is doing.

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
is there anythink in particular i should be choosing or should i do the lot like i normally do?
 
>>is there anythink in particular i should be choosing or should i do the lot like i normally do?


I'm not sure what it is you normally do.

If you want us to be able to help you need to help us by posting your scripts. If you don't there is nothing more we can do for you.

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
many thanks for your help ptheriault - you were right to be focused on the script - it turned out to be the problem...
 
As I read this thread, two observations come to mind:

1. What is the problem? Show the source code that causes it.
2. What is the solution? Relate exactly how it was resolved, with code examples.

One of the major reasons for the existence of a technical forum is to post solutions to problems, so that others may find the solution without jumping through the same hoops. Were I looking for help with "MSSQL skipping DB writes", I would get this thread in the search result, and it would be of no help whatsoever. Also, those who help out with solutions won't have to go through the same process over, and over, ... and over again.

Do us all a favor and answer questions 1 and 2.

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Not NULL-terminated yet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top