Release 5.3.0 Analyze Database Notes
1. Introduction
ConnectPlaza® 5.3.0 stores the attributes of a Business Entity with a type, so that the Business Entities Overview can filter and sort numbers as numbers. For this, the Analyze table ema_boattr gets six new columns and seven new indexes. The other Analyze tables do not change.
This page is for you when you update from 5.2.x, or when you are already on 5.3.0 and changed the Analyze database by hand. When you update from 5.2.x straight to 5.3.1, follow this page first and then Release 5.3.1 Analyze database notes.
The SQL on this page is for MariaDB, MySQL and Microsoft SQL Server. It uses the default table prefix ema. If you use another prefix, replace ema in every table name on this page, also in the check commands, for example abc_boattr. The index names stay the same.
What to do depends on connectplaza.analyze.jdbc.hbm2dll in conf/connectplaza-analyze.properties of the agent. When the line is not there, the default update applies. Do not update with create or create-drop: they create the tables again and remove your Analyze data.
| Your Analyze database | What to do |
|---|---|
MariaDB, MySQL or Microsoft SQL Server, with |
Nothing. The agent adds the columns and the indexes itself when it starts. On a large database the indexes can take a while, so start the updated agent outside busy hours. |
MariaDB, MySQL or Microsoft SQL Server, with |
Add the columns and Add the indexes before you start the updated agent. |
Progress OpenEdge |
Do not stop at 5.3.0: Analyze on Progress OpenEdge cannot store Business Entities in 5.3.0. Update straight to 5.3.1 and follow Analyze on Progress OpenEdge. That page adds the columns of 5.3.0, not the seven indexes of Add the indexes: the agent does not need them to start. |
MongoDB |
Nothing. No SQL is needed. |
|
With |
2. Add the columns
Only on MariaDB, MySQL or Microsoft SQL Server, when connectplaza.analyze.jdbc.hbm2dll is validate, none or create-only.
If you already added some of these columns by hand, run only the statements for the columns that are missing. To see which columns exist: SHOW COLUMNS FROM ema_boattr; on MariaDB or MySQL, EXEC sp_columns 'ema_boattr'; on Microsoft SQL Server. Check also that boa_type is NOT NULL with the default 'Text': SHOW COLUMNS shows NO under Null and Text under Default, sp_columns shows NO under IS_NULLABLE and ('Text') under COLUMN_DEF. The existing attributes are text, and they need the value Text to show. If you added boa_type without NOT NULL or without the default, give them that value, after the column exists:
UPDATE ema_boattr SET boa_type = 'Text' WHERE boa_type IS NULL;
-- MariaDB / MySQL
ALTER TABLE ema_boattr ADD COLUMN boa_type VARCHAR(255) DEFAULT 'Text' NOT NULL;
ALTER TABLE ema_boattr ADD COLUMN boa_doublevalue DOUBLE;
ALTER TABLE ema_boattr ADD COLUMN boa_longvalue BIGINT;
ALTER TABLE ema_boattr ADD COLUMN boa_decimalvalue DECIMAL(16,6);
ALTER TABLE ema_boattr ADD COLUMN boa_booleanvalue BIT;
ALTER TABLE ema_boattr ADD COLUMN boa_datetimevalue DATETIME(6);
-- Microsoft SQL Server
ALTER TABLE ema_boattr ADD boa_type VARCHAR(255) DEFAULT 'Text' NOT NULL;
ALTER TABLE ema_boattr ADD boa_doublevalue FLOAT;
ALTER TABLE ema_boattr ADD boa_longvalue BIGINT;
ALTER TABLE ema_boattr ADD boa_decimalvalue NUMERIC(16,6);
ALTER TABLE ema_boattr ADD boa_booleanvalue BIT;
ALTER TABLE ema_boattr ADD boa_datetimevalue DATETIME2;
3. Add the indexes
Only on MariaDB, MySQL or Microsoft SQL Server, when connectplaza.analyze.jdbc.hbm2dll is validate, none or create-only. Add them after the columns, because each index needs its column.
If you already added some of these indexes by hand, run only the statements for the indexes that are missing. To see which indexes exist: SHOW INDEX FROM ema_boattr; on MariaDB or MySQL, EXEC sp_helpindex 'ema_boattr'; on Microsoft SQL Server.
On a large database this can take a while, so plan it outside busy hours. The statements are the same on all three databases.
CREATE INDEX idxattr ON ema_boattr (boa_attribute);
CREATE INDEX idxtextval ON ema_boattr (boa_value);
CREATE INDEX idxdoubleval ON ema_boattr (boa_doublevalue);
CREATE INDEX idxlongval ON ema_boattr (boa_longvalue);
CREATE INDEX idxdecimalval ON ema_boattr (boa_decimalvalue);
CREATE INDEX idxboolval ON ema_boattr (boa_booleanvalue);
CREATE INDEX idxdateval ON ema_boattr (boa_datetimevalue);
Keep the existing indexes of ema_boattr, such as idxattrval and idxboa_bo_id. The updated agent does not remove them.