-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SqlTraceFlag: Assembly not loaded #1680
Comments
Ah, this is not catched in the integration tests because the are other resources that do load the SMO. At the top of the |
i have the same resource that loads SMO also always running so never saw this one. |
- SqlTraceFlag - Fixed Assembly not loaded error (issue #1680).
@joshshand thanks to @Fiander this has been merged, I will push a new release during the weekend. |
Details of the scenario you tried and the problem that is occurring
Just noticed that SqlTraceFlag has finally been added as a resource so am just trying the most basic configuration I can think of to test it out.
Unfortunately it would seem that some SQL SMO modules are not loaded and therefore the calls for
$sqlManagement = New-Object -TypeName 'Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer' -ArgumentList $ServerName
inDSC_SqlTraceFlag.psm1
fail.Configuration is being run on local node as an Administrator.
Verbose logs showing the problem
Suggested solution to the issue
Referring to Zuldans work, it appears there is an additional helper function
Initialize-SQLSMOAssembly
that is used to load said module(s): https://github.com/Zuldan/cSQLServerTraceFlag/blob/master/cSQLServerTraceFlagHelper.psm1#L131Not sure if it will be helpful or not. 🤞
The DSC configuration that is used to reproduce the issue (as detailed as possible)
SQL Server edition and version the target node is running
SQL Server PowerShell modules present on the target node
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used
The text was updated successfully, but these errors were encountered: