Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
C drive runs out of hard disk space and NPrinting database folder was much more than 20 GB of data and increasing daily.
The specific folder increasing exponentially is a subfolder within the C:\ProgramData\NPrinting\data\base path.
Qlik NPrinting 2019 and lower
User Audit Table Issue:
An issue was discovered where the user audit table was growing exponentially due to a high number of daily task executions and the many users associated with that task. (One example of high volume was where 1000 tasks were executed per hour with several hundred user recipients in each task.)
The customer can safely execute the script cleanup_audit.sql periodically unit we fix the problem on OP-8056. This has been fixed in April 2019.
Task Execution Table Issue:
The secondary issue is that the high number of tasks running daily (1000 per hour) also increase other database file sizes
Also the size of the tables related to task executions grows over time because of the number of the high executions per day, so the customer can periodically execute cleanup_executions.sql to fully delete the task execution history.
Run two scripts which are attached with this case.
In order to run the scripts, copy and paste the content to Notepad and save the files with their respective .sql file name.
Then, from a prompt, run: "C:\Program Files\NPrintingServer\pgsql\bin\psql.exe" -h localhost -U postgres -d nprinting -p 4992 -f PATHTOFILE.sql
This script empties some auxiliary tables used to track the changes on tables (currently for debug purposes), so it is very safe to run and it cleans most of unused space.
cleanup_audit.sql
-- truncate/cleanup audit tables
TRUNCATE TABLE app_task_aud, file_aud, report_aud, publish_report_task_aud, recipient_aud, publish_report_task_recipient_aud, publish_report_task_report_aud, published_report_aud, task_aud, role_app_aud, role_aud, user_group_aud, user_group_to_usr_aud, usr_aud, role_recipient_aud, app_aud;
-- truncate cache_item
TRUNCATE TABLE cache_item;
NOTE:
This should not be necessary to be done, as tasks will be cleared out after 30 days. Should the need arise to use this script, ensure a backup is taken. The script needs to be run with caution, since it deletes in-progress executions as well.
cleanup_executions.sql
-- truncate task executions
TRUNCATE TABLE task_execution, task_execution_log;
NOTE: