July 14, 2017 at 3:52 am
This is strange. Google does not know that issue, so I wanted to share with you
Having a 4 node Failover Cluster. SQL16 EE
1 node is working just fine.
3 nodes have the exact same 3 Problems.
The errors were indicating, that machine.config was not accessible.
I added the "Users" group and the "ALL APPLICATION PACKAGES" principal to the file Permissions (advanced window)
starting mailservice with USE msdb
EXEC sysmail_start_sp
and it is working again.
Any of you had the same problem?
any explanation what could cause the machine.config permission to disapear. (the one node working had permissions correct!)
MAIL SERVICE ERROR
Message
Unable to refresh Database Mail profile SQLMail. (reason: System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.Conf)
In eventlog I see;
The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception.
The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception.
The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception.
Configuration system failed to initialize
An error occurred loading a configuration file: Access to the path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config' is denied. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config)
Access to the path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config' is denied.
Error of the powershell Step
Executed as user: removedName. A job step received an error at line 2 in a PowerShell script. The corresponding line is '(Get-Item SQLSERVER:\SQLPolicy\removedName\SHARE$a).EraseSystemHealthPhantomRecords()'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'Cannot retrieve the dynamic parameters for the cmdlet. SQL Server PowerShell provider error: Could not connect to 'removedName'. [The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. --> The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. --> The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. --> Configuration system failed to initialize --> An error occurred loading a configuration file: Access to the path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config' is denied. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config) --> Access to the path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config' is denied.] '. Process Exit Code -1. The step failed.
CEIP had some similar error.
July 14, 2017 at 5:20 am
Hi,
if mail will not work, please check the installed .net version. You need the followin version to send e-mails:
.NET 3.5
https://dba.stackexchange.com/questions/142080/sql-server-2016-db-mail-not-sending
Hope this will help you with one problem.
Kind regards,
Andreas
July 20, 2017 at 9:09 pm
Exactly right, I've run into this before when requesting a new server from the infrastructure group...they always forget to add .net 3.5 and I always forget to check in advance.
Owner & Principal SQL Server Consultant
Im Your DBA, Inc.
https://www.imyourdba.com/
July 24, 2017 at 7:39 am
hm.
it looks like the error i had, but i did not apply the same solution.
Thanks for your help/replies
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply