我們的品牌

Impact-Company-Logo-English Black-01-177x54

歡迎造訪施耐德電機全球網站

歡迎訪問我們的網站
		
我们今天能为您提供什么帮助?
Power Monitoring Expert - How can I edit configurable settings for the Windows Task Scheduler database jobs?

Issue
The scheduled database tasks use the Windows Task Scheduler to execute the PowerShell scripts required for the job to the complete. Changing any settings (other than the schedule) from the defaults requires editing the PowerShell scripts.

Product Line
Power Monitoring Expert 7.2.x

Power Monitoring Expert 8.x

Power Monitoring Expert 9.0

Power Monitoring Expert 2020

Power Monitoring Expert 2021

Power Monitoring Expert 2022

Power Monitoring Expert 2023

Power Monitoring Expert 2024

Environment
Database jobs that run as a scheduled task


Resolution
*Warning: Take backups of any files prior to modifying them. Ensure the backups are in a location that will not be overwritten (i.e. the Desktop).*

This article describes the various powershell scripts used by the scheduled tasks, and how to edit them.

Powershell files (only ones that include configuration options are listed):
All the files listed below can be found in the \config\cfg\dbscheduledTasks folder.

Configuration.ps1 (located in the Support subfolder).
This file allows you to specify the following:

  1. The location for the database backups. The default is \config\cfg\DBBackups
  2. The maximum size for ION_Data (for Express users). The default is 8 Gb.
  3. The percentage of this maximum size that will result in a size notification message (for Express Users). The default is 85% the maximum ION_Data size
  4. The number of days of data that you wish to retain in the Diagnostics.LogEventView view in the ApplicationModules database. The default is 30 days.
  5. The location for the archived database. The default is “cfg\archives” – this is relative to the \config folder. You can specify and absolute path such as “d:\my_archives”
  6. The number of days worth of data to keep in your live database. The default is 370.


ArchiveDB.ps1
This file allows you to specify what type of data to archive/trim. There are three ‘types’ of data. Interval data is stored in DataLog2, Event data is stored in EventLog2 and Waveform data is stored in WaveformLog2. By default, all types of data are archived, but none are trimmed from the live database. You can edit this file to change these default settings.

Backup.ps1
This file allows you to specify the number of database backups you wish to retain. The default is 2. Below is a screenshot showing which line to change. FA210520 has a video showing how to make this change also.

Number of Backups to Keep

More on Archives
A scheduled archive task was added back in PME 7.2.2 and newer
In PME 7.2.2 and newer the archive dts package was replaced by a number of stored procedures. The scheduled archive task uses ArchiveDB.ps1 to supply the input parameters and to run the stored procedures. Configuration.ps1 was updated in PME 7.2.2 and 8.x to include information required by the archive task. Upgrades to PME 7.2.2 or newer from PME 7.2 will not update Configuration.ps1 so scheduled archives will not work unless the PME 7.2.2 or newer version of this file is copied from the config_new_7.2.2 or config_new_8.0 folder into the active \config\cfg\dbscheduledTasks\Support folder).

IMPORTANT: Since the original version of this file contains some configuration information for the backup and size notification tasks, any custom settings will be overwritten and have to be redone. This is particularly important if any file locations for the database backups have been changed.

To configure archives:

  • Edit configuration.ps1 to set the location of the archive database and to set the number of days that will not be included in the archive. For example, if you have a database that contains three years of data, and you accept the default of 370 days, the archive database will archive from the beginning of the database to the current most recent timestamp – 370 days, approximately one year of data.
  • Edit ArchiveDB.ps1 to specify whether or not you want the archived data to be removed from the live database. To do this, look for this section in this file:


$archiveInterval = 1
$archiveEvents = 1
$archiveWaveforms = 1
$trimInterval = 0
$trimEvents = 0
$trimWaveforms = 0

Interval/Events/Waveforms refer to interval data (DataLog2), event data (EventLog2) and waveform data (Waveform2) respectively. By default, the archive task will archive all types of data, but not trim any data. Change the 0 to 1 for $trimInterval/$trimEvents/$trimWaveforms to trim data from the live database after the archive database has been created.

More on Backups
You can change backup location, number of backups to retain, and when the backup job runs
To change the backup location, edit Configuration.ps1.
To change the number of backups that are retained, edit Backup.ps1.

  • Look in the section called ‘Constants’ near the top of the file to change it.

施耐德電機Taiwan

探索更多
系列:
探索更多
系列:

需要協助?

  • 產品選型工具

    快速輕鬆地為您的應用找到合適的產品和附件。

  • 取得報價

    立即線上提交您的銷售需求,專業團隊將主動聯繫您。

  • 購買地點

    輕鬆在您所在地區找到最近的施耐德電機經銷商。

  • 支援中心

    在同一位置找到滿足您所有需求的支援資源。

  • 產品文檔
  • 軟體下載
  • 產品選型工具
  • 產品替代和替換
  • 幫助和聯絡中心
  • 尋找我們的辦公室
  • 取得報價
  • 人才招募
  • 公司簡介
  • 舉報不當行為
  • 無障礙
  • 新聞中心
  • 投資者
  • 專業洞察
  • 台灣施耐德電機學院
  • 綠色影響力落差調查
  • Schneider Go Green 2025
  • 隱私政策
  • Cookie通告
  • 使用條款
  • Change your cookie settings