Reputation: 89
I have a database where I need to execute the following command to make the database read-only,
UPDATE TSYSTEM SET SYSREADONLY='T'
This is a backed up copy of our live database. However, I may need to make changes in future.
Which command should I execute to allow the database to be edited?
Thanks for the help in advance.
Upvotes: 1
Views: 1325
Reputation: 69494
I don't know what is this command you have showed in your question, but to change database from read-only to read-write you would execute the following:
USE [master]
GO
ALTER DATABASE [DB_Name]
SET READ_WRITE WITH NO_WAIT;
GO
And to put database back into read-only mode you would execute the following:
USE [master]
GO
ALTER DATABASE [DB_Name]
SET READ_ONLY WITH NO_WAIT;
GO
Upvotes: 5