Maintaining a connection#
Once in service, a connection is changed, hidden or deactivated from Administration › Connections. This page explains what happens in each case, what to do if the saved password can no longer be read and how sessions with the database are shared out.
Before you start#
- You need System administration.
- If you are going to change the database, the engine or the schemas of a connection with metadata, warn whoever administers it first: they will have to review it.
Change a connection#
- In Administration › Connections, choose the connection and press Edit.
- Change what you need. To keep the password, leave Keep the saved password ticked.
- Press Test if you have changed the database, the user or the schemas.
- Press Save changes.
What can be changed is the same as when creating it (see Creating and testing a connection). Changing only the name does not rewrite the saved URL.
If the connection already has metadata and you change the URL, the engine or the schemas, the dialog warns without preventing it: “This connection has 8 fact tables. If you change the database, refresh the catalog and check the consistency of the metadata; if you change the engine, check the expressions, functions and universes too”. After saving:
- Refresh the catalog (see The database catalog).
- Open the metadata editor and look at the consistency strip, which says which tables or columns are no longer there.
- If you changed the engine, review the metric expressions, the dimension functions and the universe conditions, which are written in the engine's SQL.
- Run Validate content to see which documents no longer fit (see Usage and validation).
Important
Changing the access details (the URL, the user, the password or the schemas) renews the connection's session pool. Queries in progress finish with the old sessions; new ones use the new sessions.
The password that cannot be decrypted#
Connection passwords are stored encrypted with the installation key, ECENTER_SECRETS_KEY. If that key changes or is lost, ECenter can no longer read them:
- The connection stays in the list and can be edited, but its detail and its dialog show “The saved password cannot be decrypted: enter it again.”.
- When it is used (testing, reading the catalog, querying) it gives an error asking for the password to be entered again, and the operations console gives that as the reason for its status.
To fix it:
- Choose the connection and press Change password in the warning. The dialog opens with the focus on Password.
- Type the database password.
- Press Save changes.
If you put back the old key, the passwords that have not been changed work again: saving a connection without a new password keeps what is encrypted as it is.
Warning
Keep ECENTER_SECRETS_KEY in a safe place and with a copy. Without it, the password of every connection must be typed again. See Configuration.
Only for metadata administrators#
With Only for metadata administrators ticked, the connection appears in the list with the Metadata only mark and only the connection selector and the metadata editor offer it, to those with Metadata administration or System administration. Other users neither see it nor can use it.
Use it to prepare a new connection or a new version of the metadata without showing it. When the design is ready:
- Give access in Administration › Users and roles (the read privileges the metadata uses and Access to Empowerment Center).
- Edit the connection, clear Only for metadata administrators and press Save changes.
Assistants (MCP): verified content only#
The Assistants (MCP) block of the connection detail has the Verified content only box: with it, AI assistants that query through the MCP server only see the connection's Verified documents and only calculate what starts from one of them. It applies immediately and the audit records it. See MCP server.
Deactivate and activate#
Nobody can use a deactivated connection. To deactivate it:
- Choose the connection and press Deactivate.
- Read the question: “No one will be able to use it: its workbooks will not open and what is scheduled on it will fail until it is activated. Its running jobs will be canceled.”.
- Press Deactivate connection.
The list shows it as Deactivated. Its metadata, its workbooks and its configuration are kept. While it is deactivated its catalog cannot be refreshed.
To use it again, choose it and press Activate. It asks nothing.
Why a connection is not deleted#
ECenter does not delete connections: its metadata, its workbooks, its lists, its publications and its history depend on it. Deactivate it if it is no longer used. If you want to start the design from scratch, create another connection to the same database.
The session pool#
For each connection, ECenter keeps a set of sessions open with the database (the pool) that all jobs share: users' cubes and charts, lists, forms, scheduling, deliveries and the API. It is configured for the whole installation with these properties:
| Property | Default | What it is |
|---|---|---|
ecenter.datasource.pool.max-size |
5 |
Maximum sessions per connection. |
ecenter.datasource.pool.min-idle |
0 |
Sessions kept open without use. |
ecenter.datasource.pool.idle-timeout |
5m |
How long a session is kept open without use before closing it. |
ecenter.datasource.pool.connection-timeout |
15s |
How long a job waits for a session to become free; after that it fails. |
ecenter.datasource.pool.retire-timeout |
10m |
When the access details change or the connection is deactivated, how long it waits for the sessions in use to finish before cutting them off. |
ecenter.datasource.catalog.refresh-wait |
10s |
How long Refresh catalog waits for its job before following it in the background. |
max-size should not go below the number of jobs that run at the same time on the connection (ecenter.jobs.max-concurrent): otherwise, a job waits for a free session until connection-timeout and fails. API queries take at most two sessions of each connection. With environment variables, the property ecenter.datasource.pool.max-size is ECENTER_DATASOURCE_POOL_MAX_SIZE.
The status of each connection, with the sessions of its pool in use and the jobs waiting for one, is shown in the operations console (the Its status and its pool in Operations link in the detail). See Operations.
Cancel a query in the database#
Canceling a job in ECenter (from Activity, the operations console or when stopping a scheduled run) also cancels the statement it was running in the client database, and the session is discarded from the pool. Whoever cancels does not wait for the database to respond.