Submit a ticketCall us

Have You Auto Renewed? If not, you're missing out.
The SolarWinds Renewal Program comes with a host of benefits including the most recent product updates, 24/7 technical support, virtual instructor-led training and more. Experience all of this with the convenience of Auto Renewal, and never worry about missing any of these great benefits. Learn More.

Home > Success Center > Network Performance Monitor (NPM) > Error while executing script - Failed to update database "NetperfMon" because the database is read-only

Error while executing script - Failed to update database "NetperfMon" because the database is read-only

Updated: August 08, 2016

Overview

Configuration Wizard fails with the following message:

Completing the Orion Configuration Wizard

The configuration wizard has failed

Database configuration failed:

Error while executing script - Failed to update database "NetperfMon" because the database is read-only.

 

The operation cannot be performed on database "NetperfMon" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.

 

 

Environment

All Orion Platform versions 

Cause

The Orion DB is hosted on the SQL Server Availability Group. The primary replica makes the primary databases available for read-write connections from clients. The Primary replica sends transaction log records of each primary database to every secondary database. Every secondary replica caches the transaction log records (hardens the log) and then applies them to its corresponding secondary database.

Resolution

To resolve this issue:

Configure Readable Access on an Availability Replica (SQL Server)
 

To configure access on an availability replica

  1. In Object Explorer, connect to the server instance that hosts the primary replica, and expand the server tree.

  2. Expand the Always On High Availability node and the Availability Groups node.

  3. Click the availability group whose replica you want to change.

  4. Right-click the availability replica, and click Properties.

  5. In the Availability Replica Properties dialog box, you can change the connection access for the primary role and for the secondary role, as follows:

    • For the secondary role, select a new value from the Readable secondary drop list, as follows:

      Yes
      All connections are allowed to secondary databases of this replica, but only for read access. The secondary database(s) are all available for read access.

      Read-intent only
      Only read-only connections are allowed to secondary databases of this replica. The secondary database(s) are all available for read access.

      No
      No user connections are allowed to secondary databases of this replica. They are not available for read access. This is the default setting.

    • For the primary role, select a new value from the Connections in primary role drop list, as follows:

      Allow all connections
      All connections are allowed to the databases in the primary replica. This is the default setting.

      Allow read/write connections
      When the Application Intent property is set to ReadWrite or the Application Intent connection property is not set, the connection is allowed. Connections where the Application Intent connection property is set to ReadOnly are not allowed. This can help prevent customers from connecting a read-intent work load to the primary replica by mistake. For more information about Application Intent connection property, see Using Connection String Keywords with SQL Server Native Client.


Once done, check if you are able to alter or truncate the tables in the DB using the SQL Studio. 

 

You may need to reboot the nodes required after these changes. 

 

Last modified

Tags

Classifications

Public