Hi,
I'm trying to start Bonita but it failed. The full error message I got is:
PreparedStatementCallback; uncategorized SQLException for SQL [UPDATE configuration SET resource_content=? WHERE content_type=? AND resource_name=?]; SQL state [S0002]; error code [3906]; Failed to update database "BONITA_BPM" because the database is read-only.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Failed to update database "BONITA_BPM" because the database is read-only
What I know up to now is that last night my web server was reset, and this moring we cannot start Bonita. Our Bonita version is 7.9.3 .
Is there anyone who had encounter this error? And how can I fix it?
Thank you.
The error message you provided indicates that there was an attempt to execute an SQL UPDATE statement on the "configuration" table in the "BONITA_BPM" database, but the database is in read-only mode. This error typically occurs when the underlying database system, in this case, Microsoft SQL Server, is configured to prevent any modifications to the database.
There could be several reasons why the database is in read-only mode, including:
-
Configuration settings: The database server may have been configured to allow only read operations for security or maintenance purposes.
-
Insufficient permissions: The user account used to connect to the database might not have the necessary permissions to perform write operations.
-
Locks or conflicts: There may be locks or conflicts in the database that prevent updates from occurring.
To resolve this issue, you can try the following steps:
-
Verify database permissions: Ensure that the user account used to connect to the database has the appropriate permissions to perform write operations.
-
Check database configuration: Review the database configuration settings and make sure that read-write operations are allowed.
-
Resolve locks or conflicts: Check if there are any locks or conflicts in the database and resolve them if possible. Restarting the database server may also help clear any existing locks.
The error message "Failed to update database 'BONITA_BPM' because the database is read-only" indicates that the database is currently in read-only mode. This means that any attempt to update the database will fail.
The error code 3906 is specific to SQL Server and indicates that a transaction was attempted while the database was in read-only mode. This error can occur in a number of different scenarios, such as:
- Trying to start a transaction when the database is in read-only mode.
- Trying to update a view or execute a stored procedure when the database is in read-only mode.
- Trying to start a subordinate transaction when the database is in read-only mode.
To fix this error, you will need to make the database temporarily available for writes. You can do this by following these steps:
- Open SQL Server Management Studio.
- Connect to the database that is in read-only mode.
- Right-click on the database and select "Properties".
- Click on the "Options" tab.
- Under the "Database Options" section, clear the "Read-only" checkbox.
- Click on the "OK" button.
Once you have made the database available for writes, you will be able to update the database without any errors. However, it is important to remember that the database will still be in read-only mode until you explicitly change it back.
Thank you for your suggestion :)
I checked my database setting earlier. It was not set to read-only mode, and I can INSERT/UPDATE database directly.
I've just solved the issue by delete DB Availability Group and re-create it, after that I can start Bonita without any issue. Though we still have no idea what is the actual root cause.