Make database read/write in MS SQL Server
When we have the problem with READ ONLY SQL DATABASE(It can happen while we trying to attach different version database file).
First up all we need to make the security of ldf and mdf file to everyone/current user, preferably Full Control.
And then simply execute the script
( if this script not working, do the same for folder and drive in which the database file resides. )
USE [master]
Go
Alter database [readonlydb] set READ_WRITE WITH NO_WAIT
GO
Or use the query without the NO_WAIT option.
USE [master]
Go
Alter database [readonlydb] set READ_WRITE
GO
First up all we need to make the security of ldf and mdf file to everyone/current user, preferably Full Control.
And then simply execute the script
( if this script not working, do the same for folder and drive in which the database file resides. )
USE [master]
Go
Alter database [readonlydb] set READ_WRITE WITH NO_WAIT
GO
Or use the query without the NO_WAIT option.
USE [master]
Go
Alter database [readonlydb] set READ_WRITE
GO
Comments
Post a Comment