Hi - I'm looking at alternative ways of setting a Primary database to read_only - or at least preventing all writes to it. The database is being migrated and is in an availability group on the source. Unfortunately taking it out of the AG is not an option. In this setup, setting the database property to read_only is not allowed ("The operation cannot be performed on database because it is involved in a database mirroring session or an availability read_only") so I'm looking at alternative options.
So far I've come to the idea of adding a new login, adding to the sysadmin role, disabling all other existing ones and either killing connections or letting them dry up. But is there anything more elegant than this?
Thanks in advance.