Unsuccessful metadata update, STORE RDB$FIELDS failed, STORE RDB$FIELDS failed attempted update during read-only transaction

Abstract: This error can occur when migrating a security database from older version of InterBase to InterBase XE or later

The security database for InterBase is named ADMIN.IB by default. If you backup and restore your security database from a version of InterBase prior to version XE,  trying to use it with InterBase XE or later, you will get the error:

Unsuccessful metadata update
STORE RDB$FIELDS
failed attempted update during read-only transaction

This is because InterBase XE adds a new field to the security database to support strong passwords. To allow your security database from an older version to be used with InterBase XE later, run the following SQL against your restored database:

CREATE DOMAIN PASSWORD_DIGEST AS VARCHAR(16) CHARACTER SET ASCII;
alter table users add password_digest password_digest;
update users set password_digest='SHA-1' where user_name='SYSDBA';

For more details, see the Implementing Stronger Password Protection 
section of chapter 6 of the InterBase Operations Guide.