Question

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?

Edit on question:

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

Final Solution:

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.

Was it helpful?

Solution

I suppose you have three options.

  1. Set user permissions so that user x can only read from the database.

  2. Set the database into single user mode so only one connection can access it

    sp_dboption 'myDataBaseName', single, true

  3. Set the database to readonly

    sp_dboption 'myDataBaseName', read only, true

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top