I have run the below code to change the standby readonly database to read_write and get the below error - why?: USE [master] set transactionisolationlevel serializable ALTER DATABASE [mydb] SETSINGLE_USERWITHROLLBACK IMMEDIATE ALTER DATABASE [mydb] SETREAD_WRITEWITH NO_WAIT ALTER DATABASE [mydb] SETMulti_USERWITHROLLBACK IMMEDIATE error: Msg 5063 ,Level 16,State 1, Line 7 Database 'mydb'isin warm standby. A warm-standbydatabaseisread-only . Msg 5069 ,Level 16,State 1, Line 7 ALTER DATABASEstatement failed .
First , welcome to Forums Standby by DB couldn’t be brought as Read –Write till getting it Online first since it is in standby state for any further transaction log restore which is the main abstraction of transaction log shipping + DB Mirroring between a Primary (Online DB ) + a secondary DB (Standby by DB) Therefore , you have to get the last Tail transaction log backup from the primary to capture all active transactions as well and then restore it on standby DB , then it should come back to read- write DB