我們的品牌

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

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

歡迎訪問我們的網站
		
我们今天能为您提供什么帮助?
Power Monitoring Expert (PME) Task Scheduler tasks fail. Last run result 0x1F4. Powershell scripts output error "Exception calling "Open" with "0" argument(s): "A network-related or instance-specific error occurred while establishing a connection to SQL"
Issue
Power Monitoring Expert (PME) uses scheduled tasks to trim, backup, etc the PME databases. In the task scheduler, the last run result is "0x1F4" indicating they failed. Using this Schneider official FAQ https://www.se.com/us/en/faqs/FA263465/ to run any of the PowerShell scripts manually, the debug error statement outputs the following (see bolded line):

An error occurred during the execution of the Maintenance task for ION_Network: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {00000000-0000-0000-0000-000000000000} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.PowerShell.Commands.NewObjectCommand.SafeCreateInstance(Type t, Object[] args)
DEBUG: System.Management.Automation.MethodInvocationException: Exception calling "Open" with "0" argument(s): "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)" ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)

Product line
Power Monitoring Expert 8.x
Power Monitoring Expert 9.x
Power Monitoring Expert 2020
Power Monitoring Expert 2021
Power Monitoring Expert 2022
Power Monitoring Expert 2023

Environment
Task Scheduler
SQL Server Management Studio (SSMS)
Powershell

Cause
A file in the DbScheduledTasks folder "DatabaseHelper.ps1" includes variables that define the PME system. The default parameter assumes the system is using the default instance of SQL, "ION." If the user is not using the default and has a new name, the connection to the database fails. Two options to find the SQL instance name are SQL Server Management Studio (SSMS) or the PME diagnostics tool.

In SSMS, the instance name can be automatically detected when the application is launched. To open the PME diagnostics tool, refer to the PME system guide or to this Schneider official FAQ https://www.se.com/us/en/faqs/FA275753/ . Click "select none" to deselect the checked items. Scroll to the box that says "SQL server information" and check it. The generated .html file "called SQL Server Information" contains the SQL instance name and version at the top.

Resolution
  1. Open the file \Power Monitoring Expert\config\cfg\DbScheduledTasks\Support\DatabaseHelper.ps1. (If your PME is a distributed system, a custom location on the database server will contain this file.)
  2. Use ctrl+f to find the variable "$sqlInstanceName." Set the variable equal to your PME SQL instance name, or to an empty string "". If you are using the default it would remain, $sqlInstanceName = "ION"
  3. Attempt to run a script from Powershell to test functionality
  4. If the same error message appears, use this Schneider official Youtube video https://www.youtube.com/watch?v=XJmUCK5uqPY to check that a connection to the SQL databases can be made from the server.

施耐德電機Taiwan

需要協助?

  • 產品選型工具

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

  • 取得報價

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

  • 購買地點

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

  • 支援中心

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

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