1

I'm currently running Microsoft SQL Express Server. When one user performs a query without committing it, it locks the entire table. The problem is that malicious users might "ruin" the database by doing so on purpose. How can I prevent this from happening?

4
  • 2
    Need more info. What sort of query is it? How are they running the query without committing it? Commented Oct 18, 2012 at 22:31
  • They use pyodbc, perform res = con.execute('insert into mytable...'), at that point the table is locked until they res.commit(). Commented Oct 18, 2012 at 22:33
  • 1
    Is this a programmer or a user locking the table? Are you waiting for the user to perform an action before you call commit? Commented Oct 18, 2012 at 22:38
  • These are programmers, they can at any point decide to lock that table. Is it possible to set a lock timeout on a table or something like that? Commented Oct 18, 2012 at 22:43

1 Answer 1

1

You need to understand database isolation levels http://en.wikipedia.org/wiki/Isolation_(database_systems). Most likely you are running queries as seralizable which will have that effect. Try submitting some code.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.