Question
· Jul 21

Activate a mirror database gives "protected" error

Hi,

I have a mirrored database called ROUTER.

I have a primary server T1 and a "Disaster Recovery" server T2.

When I activate ROUTER database on T2, I get the error it says the "Database could not be mounted".

I went to the audit database and it shows "Attempt to access a protected database".

T2 in mirror monintor shows "Connected" "Caught up" "Warning! Some databases need attention"

T2 show the ROUTER database as being "Mounted/R"

Both T1 & T2 are Linux servers. The ROUTER database file IRIS.DAT have the same Linux permissions

All productions on T1/T2 are not running.

What causes the error "Attempt to access a protected database"?

Discussion (3)3
Log in or sign up to continue

The error "Attempt to access a protected database" occurs due to a lack of necessary access privileges. In the context of mirrored databases like the ROUTER database on your T2 server, this error typically indicates that the user or process trying to access the database does not hold permissions required for operations on that database.

To resolve this:
1. Ensure that the user or process attempting to mount or access the database on T2 has the appropriate privileges assigned to the database resource. For the database, the relevant permissions are controlled by the associated database resource, such as %DB_. Users must have "Read" permissions to access data and "Write" permissions for modifications [1].

  1. If the database has no explicitly defined database resource, it defaults to the %DB_%DEFAULT resource. Ensure that the roles or users interacting with the database have the necessary privileges associated with the %DB_%DEFAULT resource [1].

  2. You can verify user privileges by using methods such as $SYSTEM.Security.Check(resourceName, privilegeName). For example:

    WRITE $SYSTEM.Security.Check("%DB_ROUTER", "READ")
    

    This will return 1 if the process has Read permissions on the %DB_ROUTER resource or 0 otherwise [1].

In summary, the error is a result of privilege misconfigurations, and you need to audit and adjust user or process privileges for the concerned database or resource.

[1]

Sources: