My app has been running fine on sql 2008 for 10 years. Recently, when I do some actions not related to calculation on the app it shows " divide by zero encountered". Could somebody kindly help me? Thanks!
if you can give some specifics, it will be easier. but in general:
- figure out what layer the error is coming from. probably either your app (business logic and presentation) or the backend (SQL Server).
- If the latter, and if you can reproduce the error, run SQL Server Profiler to see the queries then recreate the problem to see which query it is,
- when you know the failing query, find the division and look at the data it works on. That's likely where your problem lies.
Thank you very much for your reply, gbritton. It was showed: error number: -2147467259 error source: microsoft sql native client. Can this tell where the error come from?
run SQL Server Profiler to see the queries then recreate the problem to see which query it is,
I only can see " EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters"
it's a Windows app
Also available within SSMS:
Or use Extended Events