We are facing a situation in one of our production server. We have a particular Store procedure which perform an Insert operation on one of the biggest tables in the DB (It has more than a few million rows). This table is the most busy table in the DB and has many operations dependent upon it.
Recently we have been facing an issue on one particular production server.
We execute a Insert SP along with some other update SPs in one single transaction, and we are facing Long running transaction issue for the Insert SP quite regularly. When ever we get this issue we find a typical behaviour in the data that gets inserted into the table. The datetime column value is getting inserted as null . It happens some times for all rows and some time for a few rows. The datetime value is passed from the application. But the other update operations that are performed before and after the insert operation work well.
我们的测试环境(生产服务器中无)有色谱仪,但发现日值每时都得到适当传递。
Also when we face the issue in production, we observe that:
- @@trancount is equal to 0 but the DBCC OPENTRAN displays the particular open transaction.
- The Last Wait type has value NETWORKIO .
- The Waittype is 0x0000 .
- The Status is sleeping .
- The ISOLATION LEVEL is READ UNCOMMITTED.
So our concern is
- Why the datetime is getting inserted as NULL in this particular situation only?
- How to avoid this situation and also the long running transaction?
- What may be the cause for such situation to arise in one particular server?
Thanks in advance for the help,
Abhijit