Skip to content

Enable-DbaAgHadr fails when run on servers with PolyBase installed #9443

@packfan73

Description

@packfan73

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

WARNING: [10:22:33][Update-ServiceStatus] (MSSQLSERVER on SQL-node1) The attempt to stop the service returned the following error: The se
rvice cannot be stopped because other services that are running are dependent on it.
WARNING: [10:22:33][Update-ServiceStatus] (MSSQLSERVER on SQL-node1) Run the command with '-Force' switch to force the restart of a dependent SQL Agent

Steps to Reproduce

Run command on servers with the PolyBase feature installed:

Enable-DbaAgHadr -SqlInstance SQL-node1, SQL-node2 -Force

Please confirm that you are running the most recent version of dbatools

ModuleType Version Name ExportedCommands


Script 2.1.22 dbatools {Select-DbaObject, Set-DbatoolsConfig, Add-DbaAgDatabase, Add-DbaAgListener...}

At the time I ran the Enable-DbaAgHadr command this was the latest.

Other details or mentions

Wasn't really sure why it wasn't working as it worked fine for numerous server builds prior to this. I decided to try stopping the SQL Server Service directly and it prompted me for not just SQL Agent but also the PolyBase services. These are not accounted for in the modules, which probably isn't too surprising as PolyBase isn't the most common service out there. I also noticed that these services aren't in the Stop-DbaService -Type list, only Agent,Browser,Engine,FullText,SSAS,SSIS and SSRS are covered.

What PowerShell host was used when producing this error

Windows PowerShell (powershell.exe), Windows PowerShell ISE (powershell_ise.exe)

PowerShell Host Version

PSVersion 5.1.17763.5328
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.5328
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

SQL Server Edition and Build number

SQL Server 2022 CU12

.NET Framework Version

PSChildName Version


Client 4.8.03761
Full 4.8.03761
Client 4.0.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugs lifetriage requiredNew issue that has not been reviewed by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions