Technical FAQs

Ask a Question

Database Scheduled Task Files and Supporting Files

Issue
Database jobs are periodically run using scheduled tasks and can manually be run from Database Manager as well.  This article describes an alternative way to manually running the jobs.


Product Line
This article applies to PME7.2 and its variations, Data Center & Health Care.


Environment
Windows PowerShell


Related Articles
FA230476: Basic PowerShell Commands
FA230636: Changing Database Backup Location in PME 7.2


Cause
Provides a better understanding on the database tasks and a way of trouble shooting in case of a problem.


Resolution
1.  Supporting Files
The supporting files are located in ...\config\cfg\dbscheduledtasks\support\ folder and are used by the script files; they are not to be run by themselves.

The one of importance is Configuration.ps1 which has the following three parameters and values:
     $locationForBackupFiles = "cfg\DBBackups\"
     $databaseSizeNotificationThresholdPercentage = 85
     $diagnosticsDaysToKeep = 30


2.  Script Files
There are four script files and they are located in ...\config\cfg\dbscheduledtasks\ folder.
Each script file requires a database name to be passed as a parameter.  This is identified by opening the file and observing the first line:
     param($databaseIdentifier)

Below is the parameter that can be passed to each one of the script files and an example.
Backup.ps1
Database Parameter Command to Run from PowerShell
ION_Data ion .\backup.ps1 ion
ION_Network nom .\backup.ps1 nom
ION_SystemLog syslog .\backup.ps1 syslog
ApplicationModules apps .\backup.ps1 apps
                   

DatabaseMaintenance.ps1
Database Parameter Command to Run from PowerShell
ION_Data ion .\databasemaintenance.ps1 ion
ION_Network nom .\databasemaintenance.ps1 nom
ION_SystemLog syslog .\databasemaintenance.ps1 syslog
ApplicationModules apps .\databasemaintenance.ps1 apps
                   

DatabaseSizeNotification.ps1
Database Parameter Command to Run from PowerShell
ION_Data ion .\databasesizenotification.ps1 ion
ION_Network nom .\databasesizenotification.ps1 nom
ION_SystemLog syslog .\databasesizenotification.ps1 syslog
ApplicationModules apps .\databasesizenotification.ps1 apps
                   

TrimDiagnostics.ps1
Database Parameter Command to Run from PowerShell
ION_SystemLog syslog .\trimdiagnostics.ps1 syslog
ApplicationModules apps .\trimdiagnostics.ps1 apps
                   
Note that the above does not return any information back to the console.
Was this helpful?
What can we do to improve the information ?