-
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
Error on AvailabilityGroup Creation: SqlAG #1151
Comments
I have removed xSqlServer DSC Resource and now my server has only SqlServerDsc resource only. see the output of Get-Module sql -ListAvailable
|
Please see issue #812, I think you experience the same problem? |
@mohamednazar Issue #812 is for SqlServerDsc as well, just that the issue has been open since before the rename. |
we installed with SSMS 17.7 on target node. Microsoft SQL Server 2016 (SP2-CU1) (KB4135048) - 13.0.5149.0 (X64) May 19 2018 09:41:57 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Datacenter 10.0 (Build 14393: ) (Hypervisor) Please let me know if you need any other info? Thanks, |
@johlju waiting for your response. |
I running this in my lab to see if I can reproduce it, but it's gonna take a while since I don't have that much bandwidth for this. |
Thanks for the update, please let me know as soon as you find anything... |
The problem seems to be when SSMS is installed prior to the configuration is run. SSMS probably adds assemblies that are the wrong version than SQLPS expects.
When running the configuration without SSMS 17.7 installed the AG is created successfully. Successful
Fails
|
Thanks after I removed SSMS 17.7 I am able to create SQLAG using DSCResource. I have to install SSMS before SQLAG creation, so shall I install any lower version of SSMS like 14.0.17177.0? |
Not sure it helps with a lower version, but please try and let me know the result. An workaround is to install SSMS after AG is created, but then maybe consistency checks fail when SSMS is installed - I have not tested that. 🤔 The problem I think is that "Import-Module SQLPS" is loading the wrong assemblies when SSMS is installed. |
Using SSMS 17.8.1 together with latest SqlServer module seems to work. Successful
|
@mohamednazar can you confirm that the SSMS 17.8.1 and latest SqlServer module works for you as well? |
upgrading ssms to 17.8.1, how to I get latest SqlServer module? Shall I uninstall and reinstall SqlServerDsc module? While I reinstalling will it get latest version of module? |
SqlServer module and SqlServerDsc module is two different modules. SqlServer is the "new" SQLPS module. https://www.powershellgallery.com/packages/SqlServer |
Oh. I am using SqlServerDsc module. Shall I continue to use it or should I change to SqlServer? Which one is the correct one? |
Ah sorry, you should have both installed on the target node 🙂 SqlServerDsc have the DSC resources, and SqlServer has all the cmdlets that SQLPS have. |
ok I will install both and try with 17.8 version of SSMS. I will update you the status once done. |
- Changes to SqlServerDsc - Updated helper function Restart-SqlService to have to new optional parameters `SkipClusterCheck` and `SkipWaitForOnline`. This was to support more aspects of the resource SqlServerNetwork. - Changes to SqlServerNetwork - Refactor SqlServerNetwork to not load assembly from GAC (issue #1151). - The resource now supports restarting the SQL Server service when both enabling and disabling the protocol. - Added integration tests for this resource (issue #751).
@mohamednazar I have merged a few PR that will mitigate these issue (loading wrong assembly) in certain scenarios. But you combination of using SQLPS module with SSMS 17.x will never work. Closing this, and assuming you got this resolved when using the necessary versions of each components above. |
@johlju installing SQL AG first then SSMS 17.x is working fine for me. You can close this case. |
Details of the scenario you tried and the problem that is occurring
When Trying to create Sql Availability Group I am getting error.
Generated at 2018-06-25 15:42:49 +0000
The DSC configuration that is using the resource (as detailed as possible)
Version of the operating system and PowerShell the target node is running
Caption OSArchitecture Version MUILanguages $PSVersionTable.PSVersion
Microsoft Windows Server 2016 Datacenter 64-bit 10.0.14393 {en-US} 5.1.14393.2248
SQL Server edition and version the target node is running
Edition : Enterprise Edition: Core-based Licensing
Version : 13.2.5026.0
Language : 1033
What SQL Server PowerShell modules, and which version, are present on the target node.
Name Version Path
xSQLServer 9.1.0.0 C:\Program Files\WindowsPowerShell\Modules\xSQLServer\9.1.0.0\xSQLServer.psd1
SQLPS 1.0 C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\SQLPS\SQLPS.psd1
Version of the DSC module you're using, or write 'dev' if you're using current dev branch
Name Version Path
SqlServerDsc 11.3.0.0 C:\Program Files\WindowsPowerShell\Modules\SqlServerDsc\11.3.0.0\SqlServerDsc.psd1
The text was updated successfully, but these errors were encountered: