Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

MS SQL table hangs on constraint violation exception

$
0
0

I need to create a Quiz Application. But during testing I am facing 1 issue.
My table structure is this:

Table 1:
id (PK)  => This column is also foreign key for Table 2:

Table 2:
id (PK)
qid (PK)

Technologies I am using is Struts 2.0, Hibernate (using full hibernate plugin for Struts to hiberate integration), MS SQL Express Edition 64 bit, Tomcat 7.0.31 64 bit Server.

For testing, I tried to create multiple threads (eg. 50) for a single user and tried to insert the entries in table 2.
Strangely, my DB hangs and I am not able to access the tables. I opened Management Studio and I am not able to perform any operation on Table 2.

Instead of hanging, the Database should have given constraint error/exception and should have proceeded to next request. The same thing when I executed for 10 threads gets executed normally.(First thread success), rest errors.

Can you let me know the cause for this as during run-time user might update/save the data frequently, so I need to do load testing. When multiple users will log in and save thier data continuously in the table I should not face this issue.

Thanks,


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>