Technical FAQs

Ask a Question

PME 7.2.2 Database Maintenance and Backup tasks are not completing

In PME 7.2.2 the Windows Scheduled tasks that are responsable for executing the database backup and maintenace tasks are not completing.

The database backups are not being created. In the Windows Task Schedular the tasks appear to complete successfully and there are no errors in the Windows Event Viewer however.

Product Line:
Power Monitoring Expert 7.2.2

Windows Task Schedular
Windows PowerShell
SQL Server

The SQL Server PowerShell snapins are not registered.

Determine the version of PowerShell that is being executed by the Windows Scheduled Tasks.

- Open the Windows Task Schedular then open the properties on one of the PME Scheduled Tasks.
- Click on the Actions tab and make note of the directory path.
   *For the 64-bit version of PowerShell the directory path will include "system32"
   *For the 32-bit version of PowerShell the directory path will include "syswow64"

- Open PowerShell
   * Open the (x86) version for 32-bit

- Run the following command to determine if the SQL Server PowerShell Snapins are registered to the appropriate version of PowerShell

get-pssnapin -registered

If the appropriate snapins are registered you will see the following output

Name        : SqlServerCmdletSnapin100
PSVersion   : 2.0
Description : This is a PowerShell snap-in that includes various SQL Server cmdlets.

Name        : SqlServerProviderSnapin100
PSVersion   : 2.0
Description : SQL Server Provider

If the snapins are registered the following procedure will not need to be performed and this is not the cause of the Windows Scheduled tasks failing to execute.

If the snapins are not registered you will receive an error message notifying that no snapins are registered.

- Run the following commands in PowerShell to register the SQL Server PowerShell snapins

For 32-bit PowerShell run:
set-alias installutil $env:windir\\framework\v2.0.50727\installutil

For 64-bit PowerShell run:
set-alias installutil $env:windir\\framework64\v2.0.50727\installutil

For the following commands be sure to check the directory path to ensure that the dll files are in the specified location. The file directory can vary depending on SQL versiion.

installutil -i “c:\Program Files\Microsoft SQL Server\100\Tools\Binn\Microsoft.SqlServer.Management.PSProvider.dll”

installutil -i “c:\Program Files\Microsoft SQL Server\100\Tools\Binn\Microsoft.SqlServer.Management.PSSnapins.dll”

Add-PSSnapin SqlServerCmdletSnapin100

Add-PSSnapin SqlServerProviderSnapin100

- After these PowerShell commands have been executed run the following command in PowerShell to verify that the SQL Server snapins have been registered.

get-snapin -registered

After the SQL Server PowerShell snapins have been registerd, the Windows Scheduled tasks that run the database backup and maintenance tasks will properly execute.
Was this helpful?
What can we do to improve the information ?