<p>I'm wanting extra security for a particular point in my web app. So I want to lock the database (SQL Server 2005). Any suggestions or is this even necessary with SQL Server?</p>

<p><strong>Edit on question:</strong></p>

<p>The query is failing silently with no errors messages logged, and does not occur inside of a transaction.</p>

<p><strong>Final Solution:</strong></p>

<p>I never was able to solve the problem, however what I wound up doing was switching to MySQL and using a transactional level query here. This was not the main or even a primary reason to switch. I had been having problems with SQL Server and it allowed me to have our CMS and various other tools all running on the same database. Previous we had a SQL Server and a MySQL database running to run our site. The port was a bit on the time consuming however in the long run I feel it will work much better for the site and the business.</p>

[{'answer_id': 5031, 'author': 'GateKiller', 'author_id': 383, 'author_profile': 'https://Stackoverflow.com/users/383', 'pm_score': 4, 'selected': True, 'text': "<p>I suppose you have three options.</p>\n\n<ol>\n<li><p>Set user permissions so that user x can only read from the database.</p></li>\n<li><p>Set the database into single user mode so only one connection can access it</p>\n\n<p>sp_dboption 'myDataBaseName', single, true</p></li>\n<li><p>Set the database to readonly</p>\n\n<p>sp_dboption 'myDataBaseName', read only, true</p></li>\n</ol>\n"}, {'answer_id': 342331, 'author': 'Justin Yost', 'author_id': 657, 'author_profile': 'https://Stackoverflow.com/users/657', 'pm_score': 1, 'selected': False, 'text': '<p>I never was able to solve the problem, however what I wound up doing was switching to MySQL and using a transactional level query here. This was not the main or even a primary reason to switch. I had been having problems with MSSQL and it allowed me to have our CMS and various other tools all running on the same database. Previous we had a MSSQL and a MySQL database running to run our site. The port was a bit on the time consuming however in the long run I feel it will work much better for the site and the business.</p>\n'}]
['https://Stackoverflow.com/questions/5025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/657/']