U4BW (Agresso) Clean up of Logs and Reports

 
Each time a report is run within Agresso it produces a log file and a report results file.  These files are stored on the Agresso Application server in the “Server Logging” folder and “Report Results” folder respectively.  They are also stored in the database in a table called ACRPRINTBLOB.  When a report or log file is viewed from “Maintenance of ordered reports” within the Agresso desktop client, the files are retrieved from the database.
Naturally the default setting within Agresso is to maintain these files on a permanent basis.  There are however very good routines within Agresso that will allow you to clear them down.  Please note however, before applying any of the following clean up routines, some organisations do want to keep these indefinitely and this may be for auditing purposes for example. However when auditing purposes as been cited for a reason for keeping reports, it is usually only a very small number of report types that fall into this category.
There are two methods within Agresso for implementing the clean up routines.  The first one is configured within the Agresso Management Console and allows you to specify that you would like to keep the file for a certain number of days.  Or alternatively that you would like to keep a particular number of each type of report.  These settings apply to both report result files and server logging files.
Agresso Blob Cleanup
The  above settings keep all report result and server logging files for 15 days.  The settings will also delete the files from the Agresso Application server which are in “Server Logging” and “Report Results”.
In the above screenshot, the “Mode” option which shows “Number of days” is  a drop down list.  As discussed, the other option available is to keep “Number of Report Orders”.
If you find you do have 10’s of Gigabytes of data in the ACRPRINTBLOB table, then it may be worth setting the value to a higher figure than 15 days and gradually reducing it down to the value you want.  This will just avoid a DELETE statement removing a huge amount of data in a single transaction which could cause the transaction log to grow a lot.
If you are in a situation where you would like to keep one or two specific types of report results files because they are perhaps a point in time snapshot of values.  Then it is possible to remove files on a more granular level.  This cannot be done in the above setup though, you need to use the AG57 report which is run from within the Agresso Desktop Client.  This report accepts parameters for types of particular reports or specific reports.  So if you have scheduled a PO01 report to run every 5 minutes and would like to clear down all of the PO01 reports, then the AG57 can be setup and scheduled to do this.  Or you could just remove all of the PO reports.
Report Deleting
The Ag57 allows a much more granular approach to removing unwanted files, but will take longer to setup than the global approach that is done within the AMC as obviously you would need to schedule one report for each set of report modules that you wanted to remove.
A common question that we are asked is that if the ACRPRINTBLOB table is over 50% the size of the total database.  Will clearing it down make the Agresso Client run twice as fast?  Afraid the answer to that would be No. It would however dramatically reduce the size of your database backups and this is particularly true when you are using SQL Server compressed backups.  The Image files are already compressed when they are stored in the database, so the backup compression has minimal effect on them.
The other advantage of clearing down unwanted report result and log files is that finding log files in the “Server Logging” folder is now manageable.  Faster backup and restore times of the database and reduced backup sizes also provide many advantages both in terms of cost and manageability.
If you are experiencing problems with having massive amounts of files in the “Server Logging” and “Report Results “directories, but are unable to implement either of the above two procedures.  Then as a workaround we would recommend scheduling a PowerShell script to archive the files from the directories and move them into a ZIP or RAR file.  We have implemented this before where once a month the job would run and move files older than a month to a compressed file.  So on the 1st of June the job would move all of the files with a timestamp of April into a single compressed file and so on.
 
 

U4BW (Agresso) Delete Logs and Reports over a certain age

In a recent article we covered how to remove old Server Logging and Report Results files.
https://www.intersect.co.uk/agresso/u4bw-agresso-clean-up-of-logs-and-reports/
Some of the feedback that we get around this subject is that there can be an uncertainty around whether all of the files should be deleted from both the database and the U4BW Application Server.
However, having several hundred thousand files in the U4BW Server Logging directory can be an issue when you try to look at any of the files, as File Explorer can take considerable time to show and sort the files.
As an alternative to using the in built U4BW options, it may be a case of leaving the files in the database, but removing them from the Application Server.  Rather than a global delete, it may be preferable to remove files that over a certain number of days old – 30 days for example.
Although it is possible to do this manually it is easier to do it with a Powershell command which can then be scheduled to run once a month.
Before running the command below you will need to edit three variables and these tell the script which directory the files are located in and how many days you want to keep.
Please note, the following code is not supported and should be verified in a non-production environment before running in production.

# Edit these variables
#===================================================
#Location of the Server Logging Directory
$ServerLogging = "C:Program FilesUNIT4 Business World On! (v7)Data Filesabwt05Server Logging"
#Location of the Report Results Directory
$ReportResults = "C:Program FilesUNIT4 Business World On! (v7)Data Filesabwt05Report Results"
#How many days do you want to keep
$Daysback = "30"
#===================================================
# End of editable variables
$CurrentDate = Get-Date
$DatetoDelete = $CurrentDate.AddDays(-$Daysback)
$ServerLoggingBefore = (get-childitem $ServerLogging).Count
$ReportResultsBefore = (get-childitem $ReportResults).Count
$now = Get-Date
"Starting to delete Server Logging " + $now
Get-ChildItem $ServerLogging | Where-Object { $_.LastWriteTime -lt $DatetoDelete } | Remove-Item
"Allowing system to catch up for 1 minute..."
Start-Sleep 60
$now = Get-Date
"Starting to delete Report Results " + $now
Get-ChildItem $ReportResults | Where-Object { $_.LastWriteTime -lt $DatetoDelete } | Remove-Item
$ServerLoggingAfter = (get-childitem $ServerLogging).Count
$ReportResultsAfter = (get-childitem $ReportResults).Count
$ServerLoggingDeleted = $ServerLoggingBefore - $ServerLoggingAfter
$ReportResultsDeleted = $ReportResultsBefore - $ReportResultsAfter
$ServerLogging
"Files before delete = " + $ServerLoggingBefore
"Files after delete = " + $ServerLoggingAfter
"Number of files deleted = " + $ServerLoggingDeleted
$ReportResults
"Files before delete = " + $ReportResultsBefore
"Files after delete = " + $ReportResultsAfter
"Number of files deleted = " + $ReportResultsDeleted

 
 
 


U4BW (Agresso) Password Reset

What is it?
The Agresso password reset functionality provides users with a password reset link on the logon screen of the ABW Desktop and ABW Web Applications. If they have forgotten their password they can click on the link and receive an email which allows them to reset it.


 
 
 
 
 
 
 
 
 

 

 

 

Prerequisites
Email integration will need to be setup and active on the Agresso Business Server. As a general rule email this is normally activated in the live environment

In the User Master File each user will need to have their email address set up against their Agresso login.

Considerations  
If you are planning on testing this first, make sure that nothing on the test system is going to send emails out. Thinking of Intellagent jobs emailing users that they have not done their time sheets. Or emails being sent to external suppliers and customers. Normally a good idea to update the email addresses in the AGLADDRESS table before email is made active on the test system.

If a user forgets their password and tries entering it three times (default setting) it will lock their account out. If they then click on the password reset link, it will allow them to change their password, but their account will still be locked out.

Setup
The setup is quite easy and straightforward, there are just two settings within the Agresso Management Console that need activating.

Log into the AMC and go to the following menu and select an email profile from the drop down list. This will be used to send the password reset emails.


 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

 

 

 

 

Then to turn this setting on, go to the menu immediately above it – Password Policy and turn it on.


 
 
 
 
 
 
 
 

 

 

 

 

The warning message can be ignored if you have already set the mail profile in the previous step.
The two settings just update values in Common Parameters. So you could alternatively configure the settings by going into the Common Parameters screen and setting the values for SYSTEM_MAIL_PROFILE to the mail profile that you want to use and PWD_RESET_ALLOWED to true.
 


Are you running Agresso Business World on Oracle?

If the licensing costs are rising after moving over to virtual environments, or the licensing costs are halting your plans to virtualise, or perhaps you simply don’t have the Oracle expertise to fully manage the system in-house. Then we can reduce your costs by hosting and fully managing your AGRESSO system in a SQL Server environment located in an ISO accredited data centre.
We carry out the data conversion between Oracle and SQL Server, along with all of the technical project management and installation that is required to seamlessly move your system to the cloud. This entire process can normally be carried out with little impact and with minimal or zero downtime during office hours.
There are no restrictions on the versions of Oracle or AGRESSO that you are using.