Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 MSSQL: random crashes in a stored procedure

Author  Topic 

Nicoh56
Starting Member

17 Posts

Posted - 2004-10-12 : 05:56:19
Hi all!

I have a stored procedure which does some select, update and delete.
This procedure is launched every minute.
Since last friday, this procedure has been failing and I don't know why...
I have put some logs in the procedure like 1,2,3,4,... in order to learn where the procedure crash.

Now, in my LOG table, I see
1,2,3
then 1,2,
then 1,2,3
and sometimes 1,2,3,4...

So it crashes in a random way!
It can be a select, an update or a delete. So I don't think it comes from the user right (which has not been changed).

I know that some other batch are running at the same time, but it's only "select" batches.

Do you have any idea of where the error comes from?
Thanks in advance for your help!

Nicolas

hgorijal
Constraint Violating Yak Guru

277 Posts

Posted - 2004-10-12 : 06:18:44
what do you mean "crash". Are there any error messages ? Did you check the SQL Server and NT error logs.

Hemanth Gorijala
BI Architect / DBA...
Go to Top of Page

Nicoh56
Starting Member

17 Posts

Posted - 2004-10-12 : 09:02:31
Hi,

When I say crash, it is that the procedure stop while running.
In fact, we have a SQL job which runs every minutes.
This job launch a stored procedure.

for now, the job status is "failed".
When I launch the stored procedure manually, it succeeds.
The only messgae I get is: "SQL Server Scheduled Job 'DaemonCommunicationThetraOSAbo' (0x21BE1356E68E764B872792EE88CD5364) - Status: Failed - Invoked on: 2004-10-12 14:14:00 - Message: The job failed. The Job was invoked by Schedule 44 (Communication Thetra). The last step to run was step 1 (WF_THETRA)."

But I don't understand while the stored procedure failed while being launched by the job, and why it succeeds while being launched manually...

And what estonish me more is that it was perfectly running one week ago!

Do you have any suggestion?

Thanks

Nicolas
Go to Top of Page

Nicoh56
Starting Member

17 Posts

Posted - 2004-10-13 : 03:38:26
Hi,

Yesterday evening, I stop the job (it is scheduled to run every minutes).
I then run the stored procedure manually and it succeeds.
I then run the job manually and it succeeds.

So, I re-enabled the job to run as scheduled.
This morning, everything is OK.

So, MSSQL seems to work like everything in windows: If you doubt, reboot ;-) (I don't know if my sentence is correct in english, but in french it sounds pretty well)

Thanks a lot

Nicolas
Go to Top of Page
   

- Advertisement -