I have a database (DB1) that is not readable because it is secondary in an AG group.
I have another database (DB2) that is not replicated with the AG group. It contains some views that reference the first database. I need to periodically alter some views.
The error is:
Msg 976, Level 14, State 1, Procedure vw_xxx, Line 4 [Batch Start Line 9] The target database, 'DB1', is participating in an availability group and is currently not accessible for queries. Either data movement is suspended or the availability replica is not enabled for read access. To allow read-only access to this and other databases in the availability group, enable read access to one or more secondary availability replicas in the group. For more information, see the ALTER AVAILABILITY GROUP statement in SQL Server Books Online."
I do not have these options:
- Enable the readable secondary (lack of licenses)
- AG failover (this is a DR site)
- Add DB2 to the same AG (too large, I only want to replicate schema not data)
Are other options available?
I have 3 AG nodes. The DR is not readable because it lacks an active license to be readable. The
ALTER VIEW occurs on DB2 at the DR site, referencing DB1 in that instance. I'm altering the views because I'm deploying changes with a dacpac in that DR site. I do not have licences to cover that DR site in an active way.