Issue
When starting any PME/ION Enterprise application, such as Management Console, Designer, or Vista, the following error appears:
"Run-time error '-2147467259 (B0004005)':
Login failed for user 'ION', Reason: Not associated with a trusted SQL Server connection."
Product Line
ION Enterprise
Struxureware Power Monitoring
Power Monitoring Expert 7.2.2
Power Monitoring Expert 8.2
Power Monitoring Expert 9.0
Power Monitoring Expert 2020
Power Monitoring Expert 2021
Power Monitoring Expert 2022
Power Monitoring Expert 2023
Environment
Thick Applications
Microsoft SQL
Cause
Typically, this will occur after PME/ION Enterprise has been installed using SQL Server Authentication on a machine with an existing SQL server instance or if the ION databases have been moved from one SQL server instance to another. PME/ION Enterprise cannot log into the databases using the “sa” account if the SQL server instance authentication mode is set for “Windows only” or "Windows Authentication mode" unless it was installed using Windows Integrated Authentication.
Resolution
*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio.*
During a new PME/ION Enterprise installation with an existing SQL instance or when moving the ION databases from one SQL instance to another, the authentication mode of the SQL instance must be sent to SQL Server and Windows or SQL Server and Windows Authentication mode (i.e. mixed mode) in order for the applications to function, unless Windows Integrated Authentication is selected.
If PME was installed using SQL Server Authentication, change the authentication mode of the SQL server instance that contains the ION databases on SQL Servers older than SQL Server 2005:
- Select Start Menu > Programs > Microsoft SQL Server > Enterprise Manager
- Right-click on the SQL server instance name and select “Properties”
- Go to the Security tab
- Change the authentication mode to “SQL Server and Windows” as shown below:
- Select OK then allow the SQL service to be restarted for the change to take effect.
If PME was installed using SQL Server Authentication, change the authentication mode of the SQL server instance that contains the ION databases on SQL Server 2005 and newer:
- Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio and connect to the database instance
- Right-click the Server name, select Properties > Security
- Under Server Authentication, select SQL Server and Windows Authentication Mode and click OK