{}

Our Brands

Welcome to the Schneider Electric Website

Welcome to our website.
Search FAQs
Power Monitoring Expert - Database Scheduled Task Files and Supporting Files
Issue
Database jobs are periodically run using scheduled tasks. These tasks can also be run manually via the PowerShell scripts which may aid in troubleshooting as the PowerShell console may give additional errors on why the tasks were originally failing. This article describes the alternative method used to manually run the tasks.

Product Line
Power Monitoring Expert 8.x
Power Monitoring Expert 7.2.x

Environment
Windows PowerShell

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

Resolution
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

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)

How to Manually Execute a Tasks
Note: Powershell is required for manual execution of the scripts.
  1. Open Powershell
    • Click Start and search for 'Windows PowerShell (x86)'
    • Right-click on 'Windows PowerShell (x86)' (Note: Be sure to open the (x86) version of PowerShell)
    • Select Run as administrator.
  2. Navigate to the \Power Monitoring Expert\config\cfg\DbScheduledTasks directory within PowerShell
    • Locate the exact location of the DbScheduledTasks directory using Windows Explorer
    • Use the change directory command, cd, to change to the DbScheduleTasks directory
For example, to change the PowerShell directory to C:\Program Files (x86)\Schneider Electric\Power Monitoring Expert DC Ed\config\cfg\DbScheduledTasks as seen in the below example, type the following command: cd 'C:\Program Files (x86)\Schneider Electric\Power Monitoring Expert\config\cfg\DbScheduledTasks'
  1. Once in the proper directory, run the command corresponding to the desired database task. The tables below contain the commands and required database parameters required to run the script manually.

Backup.ps1
DatabaseParameterCommand to Run from PowerShell
ION_Dataion.\backup.ps1 ion
ION_Networknom.\backup.ps1 nom
ION_SystemLogsyslog.\backup.ps1 syslog
ApplicationModulesapps.\backup.ps1 apps



DatabaseMaintenance.ps1
DatabaseParameterCommand to Run from PowerShell
ION_Dataion.\databasemaintenance.ps1 ion
ION_Networknom.\databasemaintenance.ps1 nom
ION_SystemLogsyslog.\databasemaintenance.ps1 syslog
ApplicationModulesapps.\databasemaintenance.ps1 apps



DatabaseSizeNotification.ps1
DatabaseParameterCommand to Run from PowerShell
ION_Dataion.\databasesizenotification.ps1 ion
ION_Networknom.\databasesizenotification.ps1 nom
ION_SystemLogsyslog.\databasesizenotification.ps1 syslog
ApplicationModulesapps.\databasesizenotification.ps1 apps



TrimDiagnostics.ps1
DatabaseParameterCommand to Run from PowerShell
ION_SystemLogsyslog.\trimdiagnostics.ps1 syslog
ApplicationModulesapps.\trimdiagnostics.ps1 apps

Schneider Electric Canada

Power Monitoring Expert - Database Scheduled Task Files and Supporting Files
Issue
Database jobs are periodically run using scheduled tasks. These tasks can also be run manually via the PowerShell scripts which may aid in troubleshooting as the PowerShell console may give additional errors on why the tasks were originally failing. This article describes the alternative method used to manually run the tasks.

Product Line
Power Monitoring Expert 8.x
Power Monitoring Expert 7.2.x

Environment
Windows PowerShell

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

Resolution
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

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)

How to Manually Execute a Tasks
Note: Powershell is required for manual execution of the scripts.
  1. Open Powershell
    • Click Start and search for 'Windows PowerShell (x86)'
    • Right-click on 'Windows PowerShell (x86)' (Note: Be sure to open the (x86) version of PowerShell)
    • Select Run as administrator.
  2. Navigate to the \Power Monitoring Expert\config\cfg\DbScheduledTasks directory within PowerShell
    • Locate the exact location of the DbScheduledTasks directory using Windows Explorer
    • Use the change directory command, cd, to change to the DbScheduleTasks directory
For example, to change the PowerShell directory to C:\Program Files (x86)\Schneider Electric\Power Monitoring Expert DC Ed\config\cfg\DbScheduledTasks as seen in the below example, type the following command: cd 'C:\Program Files (x86)\Schneider Electric\Power Monitoring Expert\config\cfg\DbScheduledTasks' 
  1. Once in the proper directory, run the command corresponding to the desired database task. The tables below contain the commands and required database parameters required to run the script manually.

Backup.ps1
DatabaseParameterCommand to Run from PowerShell
ION_Dataion.\backup.ps1 ion
ION_Networknom.\backup.ps1 nom
ION_SystemLogsyslog.\backup.ps1 syslog
ApplicationModulesapps.\backup.ps1 apps



DatabaseMaintenance.ps1
DatabaseParameterCommand to Run from PowerShell
ION_Dataion.\databasemaintenance.ps1 ion
ION_Networknom.\databasemaintenance.ps1 nom
ION_SystemLogsyslog.\databasemaintenance.ps1 syslog
ApplicationModulesapps.\databasemaintenance.ps1 apps



DatabaseSizeNotification.ps1
DatabaseParameterCommand to Run from PowerShell
ION_Dataion.\databasesizenotification.ps1 ion
ION_Networknom.\databasesizenotification.ps1 nom
ION_SystemLogsyslog.\databasesizenotification.ps1 syslog
ApplicationModulesapps.\databasesizenotification.ps1 apps
                   


TrimDiagnostics.ps1
DatabaseParameterCommand to Run from PowerShell
ION_SystemLogsyslog.\trimdiagnostics.ps1 syslog
ApplicationModulesapps.\trimdiagnostics.ps1 apps
                  

Schneider Electric Canada

Explore more
Range:
Explore more
Range:
Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Explore more
Range:
Explore more
Range:
move-arrow-top
Your browser is out of date and has known security issues.

It also may not display all features of this website or other websites.

Please upgrade your browser to access all of the features of this website.

Latest version for Google Chrome, Mozilla Firefox or Microsoft Edgeis recommended for optimal functionality.
Your browser is out of date and has known security issues.

It also may not display all features of this website or other websites.

Please upgrade your browser to access all of the features of this website.

Latest version for Google Chrome, Mozilla Firefox or Microsoft Edgeis recommended for optimal functionality.