When the log cleanup runs, it deletes logs and repository files. You may want to archive these logs and repository files before they get cleaned up. You can archive the logs:
- On a different database that should be on a different database server.
- On the same database that is being used for main log tables.
It is recommended to use a different database setup on a different database server for archival of logs.
Enabling Archival
To enable the archival:In Adeptia Connect log cleanup and archival happens daily to clean up the logs and temporary repository files older than the specified number of days (retain time). The logs cleanup and archival is governed by the properties that are discussed on this page.
Setting up the cleanup and archival properties
Follow the steps given below to set the properties related to the archival and cleanup of the logs and repository files.
Click Account > Settings.Anchor steps steps - Expand the Server Node Settings in the left panel.
- Select the server node.
- Click Edit.
- Click to expand Process Flow.
Click .
to expand ArchivalChange the value of values for the properties described in the following properties table as per your need.
- Create a database (for example, Adeptia_Logs_Archive on SQL Server) on the database server where you want to archive the logs.
- On this database, run the initialize-log-<database server name>.sql script located in the .../AdeptiaServer-x.x/ServerKernel/etc folder. This creates the tables where the archive logs will be stored (for example, for a database created on the SQL server run initialize-log-sqlserver.sql script and for a database created on an Oracle Server run initialize-log-oracle.sql).
- Now run the create-indexes-<database server name>.sql script located in the .../AdeptiaServer-x.x/ServerKernel/etc folder. This applies the indexes on the tables created in the previous step (for example, for a database created on the SQL server run create-indexes-sqlserver.sql script and for a database created on an Oracle Server run create-indexes-oracle.sql script).
- Make sure to set the value of abpm.logs.archival.database as 2Property Name
Property
Description
Default Value
Selection CriteriaPossible Values
.create.repository.archive.pathSpecifies whether to create the archive folder or not if it doesn’t existabpm . Yes Yes/No Using this property you can choose, whether to create the archive folder specified in the abpm.transaction.repository.archive.path property, or not. abpm.Set this property to Yes,logs.archival.enable Enable or disable Archival of Process flow log. No Yes/No
processEnables or disables the archival of the Process Flow logs and repository files.
- The possible values are yes and no.
- Set the value for this property to yes if you want to archive the Process Flow logs and repositories before they are cleaned up by the cleanup
archive the logs on the same database or another database.- task.
abpm.logs.archival.database Specifies whether to
1 1/2
archive the logs in theuse another database server for logs archival or not.
- The possible values are 1 and 2.
- Set this property to 1 if you want to
, where the logs are being stored- use same database
and logs are archived in these tables- server for logs and logs archival. In this case, for every log table, an archive table is created in the log database
archive the logs in the different database.- for logs archival.
- Set this property to 2 if you want to
to- use another database for logs archival.
- It is recommended
different- that you use the
because archiving the logs on the same database may affect the performance. In case you have- another database to archive the logs
the- . This prevents performance related issues that may occur when you use same database for logs and logs archival.
If you set this property to 2, you need to create a new database and
Tocreate a replica of the log tables within that database.
logTip You can refer to the section "Using separate database server for archived logs" discussed on this page to know how to create
, refer to the section described later in this pagelogs archival tables
Log Archival database that is on a different database server.
To enable Adeptia Connect to connect to the
Archivalnewly created log archive database, you need to specify the Log
ConfigurationArchive Database
archivalproperties.
abpm.logs.
batch.enablesendNotification.
archive the logs record by record or in a batch.onArchivalFailure Specifies whether to
No Yes/No If the value is No then records are archived one by one.
If the value is Yes then the records are archived in batches. It is recommended that to archive records in batches to avoid any performance related issue.
abpm.logs.archival.batch.size Specifies the number of records to be archived in one batch. 1000 Any positive integer that can be easily supported by the archival database. Its value specifies the number of records archived in one batch when abpm.logs.archival.batch.enable property is set to Yes. abpm.logs.deleteData.onArchivalFailure Specifies whether to delete the records from log table, in case any error occurred in archival, or not. No Yes/No If the value is No then records from main log tables are not deleted when there is any error during archival.
If the value is Yes then records from the main log tables are deleted, even if there is any error during archival.
It is recommended to keep this property as No.
abpm.logs.sendNotification.onArchivalFailure Specifies whether to send the mail, in case of any error during log archival or not. Yes Yes/No If the value is No then no mail notification is sent in case of any error during log archival.
If the value is Yes then mail notification is sent to the email address configured in admin user, in case of any error during log archival. Make sure that Mail Server Parameters are configured properly.
abpm.data.archival.enable Option to set process flow repository archival enable or disabled. No Yes/No Set this property to Yes, if you want to archive the process flow repositories before they are cleaned up by cleanup process.
- Click Save to save the changes.
Restart Kernel and WebRunner.
Creating Log Archival Tables on Different Database Server
In case, you are using Adeptia Connect to process a large number of files every day, it is recommended to use a separate database server for log archiving. Following are the additional steps that you need to follow in order to create log archival tables on the separate database.
If you have already created the log archival tables on the different database, you can skip the following steps.
send an email notification or not in case an error occurs during the logs archival.
- The possible values are yes and no.
- Set the value for this property to yes if you want to send an email notification to the email address configured for the admin user, in case of an error during log archival. Ensure that the mail server parameters are configured properly when you set the value for this property to yes.
abpm.archive.fetchsize Number of records to be fetched at a time from result set cursor. abpm.archive.pagesize The total number of records to be fetched by the query in a single page. abpm.archive.chunksize Number of records to be processed in each thread. All the threads run in parallel fashion. abpm.logs.b2b.retainTime Property that defines the retain time for EDI Transactions/Templates logs.
abpm.logs.db.retryErrorCodes Error codes for which retry is performed in case an error occurs while executing the query for all the tables.
You can enter multiple error code separated by comma.
abpm.logs.db.skipErrorCodes Error codes for which no retry takes place in case an error occurs while executing the query for all the tables.
You can enter multiple error code separated by comma.
abpm.logs.retainTime Property that defines the retain time for the logs (other than EDI).
abpm.archive.logRetainTime Property that defines the retain time for the archived logs. abpm.logs.retryCount The number of times the application retries running the query for log cleanup and archival in case the query execution fails.
The number of times the retry happens in case of failure of execution of a query.
abpm.logs.retryInterval Time interval (in seconds) after which the re-execution of query for transaction log and transaction data tables is performed if the query execution fails.
abpm.archive.delete.chunksize Maximum number of archived records that can be deleted from a thread at a time. All the threads run in parallel fashion. delete.chunksize Maximum number of logged records that can be deleted from a thread at a time. All the threads run in parallel fashion. - Click Save to save the changes.
Restart Kernel and WebRunner.
Setting up the log and log archive database properties
Follow the steps given below to set the properties related to log and log archive database.
- follow the steps 1 through 4 given in the section Setting up the cleanup and archival properties.
- Click to expand Maintenance.
- Click to expand Cleanup and Archival Database Properties.
- Change the values for the following properties as per your need.
Property | Example Value | Description | ||
---|---|---|---|---|
abpm.archival.archive.db.maxActive | 50 | Maximum number of simultaneous connections that can exist between the archive database and the application. | ||
abpm.archival.archive.thread.corepoolsize | 20 | Number of worker threads used for performing log archival and cleanup.
| ||
abpm.archival.archive.thread.maxpoolsize | 20 | Maximum number of worker threads that can be used to perform log archival and cleanup.
| ||
abpm.archival.archive.thread.queuecapacity | 0 | The maximum number of log archival and cleanup tasks that can remain in queued state after all the defined threads are exhausted. | ||
abpm.archival.archive.logdb.minIdle | 25 | The minimum number of idle archive database connections that must exist in the connection pool. | ||
abpm.archival.archive.logdb.maxWait | 600000 | Maximum lifetime (in milliseconds) of the archive database connection after it is closed. | ||
abpm.archival.archive.logdb.minEvictableIdleTimeMillis | 3600000 | Minimum time (in milliseconds) for which an unused archive database connection must sit idle before it becomes a candidate for eviction from the pool. | ||
abpm.archival.archive.logdb.maxStatements | 0 | Maximum number of PreparedStatements the DataSource can cache for archive database. | ||
abpm.archival.logdb.maxActive | 50 | Maximum number of simultaneous connections that can exist between the log database and the application. | ||
abpm.archival.logdb.maxStatements | 0 | Maximum number of PreparedStatements the DataSource can cache for log database. | ||
abpm.archival.logdb.maxWait | 600000 | Maximum lifetime (in milliseconds) of the log database connection after it is closed. | ||
abpm.archival.logdb.minEvictableIdleTimeMillis | 3600000 | Minimum time (in milliseconds) for which an unused log database connection must sit idle before it becomes a candidate for eviction from the pool. | ||
abpm.archival.logdb.minIdle | 25 | Minimum number of idle log database connections that must exist in the connection pool. | ||
abpm.archival.logdb.testOnBorrow | true | Specifies whether a log database connection from the pool has to be validated (usually by a simple SQL validation query defined in validationQuery) or not. | ||
abpm.archival.archive.logdb.testOnBorrow | true | Specifies whether an archive database connection from the pool has to be validated (usually by a simple SQL validation query defined in validationQuery) or not. | ||
abpm.archival.logdb.validationQuery | SELECT 1 | Defines the query that will be executed for all the log database connection tests (validation) if the default ConnectionTester (or some other implementation of QueryConnectiontester, or better yet Full QueryConnectionTester) is being used. Enter the following values based on the type of database you are using:
| ||
abpm.archival.archive.logdb.validationQuery | SELECT 1 | Defines the query that will be executed for all the log database connection tests (validation) if the default ConnectionTester (or some other implementation of QueryConnectiontester, or better yet Full QueryConnectionTester) is being used. Enter the following values based on the type of database you are using:
| ||
abpm.archival.archive.logdb.isolation.level | 1 | Defines the degree to which a transaction must be isolated from the data modifications made by any other transaction in the database. Transaction isolation level for the archive database connections in the connection pool.
| ||
abpm.archival.logdb.isolation.level | 1 | Transaction isolation level for the log database connections in the connection pool.
| ||
abpm.archival.logdb.pooltype | hikari | Defines the type of JDBC connection pool to be used for log database. | ||
abpm.archival.archive.logdb.pooltype | hikari | Defines the type of JDBC connection pool to be used for archive database. |
4. Click Save to save the changes.
5. Restart Kernel and WebRunner.