Skip to content

SqlSetup: Analysis Services Feature connection #2457

@8Ibarra

Description

@8Ibarra

Problem description

I am installing SQL Server 2025 with AS feature. But currently encountering an error when connecting to AS

There we're also a line on the logs that says it detected the AS feature and then fail the deployment when connecting.

I am already using lates versions of SqlServerDsc and SqlServer modules.

Also tried leveraging the property: FeatureFlag: "AnalysisServicesConnection"

This particular error didn't occur on SQL Server 2022 and lower.

Verbose logs

Failed to invoke DSC Set method: PowerShell DSC resource DSC_SqlSetup  failed to execute Set-TargetResource functionality with error message: System.InvalidOperationException: Failed to connect to Analysis Services instance 'mrfmrp-dsql00'. (SQLCOMMON0021) ---> System.Management.Automation.PSArgumentException: Cannot find type [Microsoft.AnalysisServices.Server]: verify that the assembly containing this type is loaded.\r\n   at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\r\n   --- End of inner exception stack trace --- "

DSC configuration

- name: Install SQL Server using DSC
      win_dsc:
        resource_name: "SqlSetup"
        DependsOn: "[WindowsFeature]NetFramework45"
        Action:  "Install"
        InstanceName: "{{ sqlserver_instance_name }}"
        Features: "{{ sqlserver_dsc_features }}"
        SQLCollation: "{{ sqlserver_collation }}"
        SourcePath: "X:\\"
        UpdateEnabled: "{{ sqlserver_patch }}"
        UpdateSource: "{{ sqlserver_source_directory }}\\last_cumulative_updates"
        SecurityMode: "{{ sqlserver_security_mode }}"
        SAPwd_username: "{{ sqlserver_sa_username }}"
        SAPwd_password: "{{ sqlserver_sa_password }}"

        FeatureFlag: "AnalysisServicesConnection"

        SQLSysAdminAccounts: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( sqlserver_admin_accounts | join(',') , 'Administrators' ) }}"
        ASSysAdminAccounts: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( sqlserver_admin_accounts | join(',') , 'Administrators' ) }}"

        # Ansible win_dsc will automatically combine parameters with
        # _username/_password to create a pscredential argument.
        SQLSvcAccount_username: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( sql_svc_acct , 'NT AUTHORITY\\System' ) }}"
        SQLSvcAccount_password: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( sql_svc_pass , 'NT AUTHORITY\\System' ) }}"
        AgtSvcAccount_username: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( agt_svc_acct , 'NT AUTHORITY\\System' ) }}"
        AgtSvcAccount_password: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( agt_svc_pass , 'NT AUTHORITY\\System' ) }}"
        RSSvcAccount_username: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( rs_svc_acct , 'NT AUTHORITY\\System' ) }}"
        RSSvcAccount_password: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( rs_svc_pass , 'NT AUTHORITY\\System' ) }}"
        ASSvcAccount_username: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( as_svc_acct , 'NT AUTHORITY\\System' ) }}"
        ASSvcAccount_password: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( as_svc_pass , 'NT AUTHORITY\\System' ) }}"
        ISSvcAccount_username: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( is_svc_acct , 'NT AUTHORITY\\System' ) }}"
        ISSvcAccount_password: "{{ ( sqlserver_join_with_domain | bool ) | ternary ( is_svc_pass , 'NT AUTHORITY\\System' ) }}"

        InstallSharedDir: "{{ sqlserver_install_dir }}"
        InstallSharedWOWDir: "{{ sqlserver_wow_dir }}"
        InstanceDir: "{{ sqlserver_instance_dir }}"
        InstallSQLDataDir: "{{ sqlserver_system_dir }}"
        SQLUserDBDir: "{{ sqlserver_db_dir }}"
        SQLUserDBLogDir: "{{ sqlserver_log_dir }}"
        SQLTempDBDir: "{{ sqlserver_tempdb_dir }}"
        SQLTempDBLogDir: "{{ sqlserver_tempdb_log_dir }}"
        SQLBackupDir: "{{ sqlserver_backup_dir }}"

        ASDataDir: "{{ as_data_dir }}"
        ASLogDir: "{{ as_log_dir }}"
        ASBackupDir: "{{ as_backup_dir }}"
        ASTempDir: "{{ as_temp_dir }}"
        ASSERVERMODE: "{{ as_server_mode }}"
        ASSvcStartupType: "{{ as_svc_startup_type }}"
        ASCollation: "{{ as_collation }}"

      register: sqlserver_install_state
      no_log: "{{ sqlserver_secure_logging }}"
      tags: install

Suggested solution

Currently exploring

SQL Server edition and version

SQL Server 2025 Developer edition

SQL Server PowerShell modules

sqlserver_ps_modules:
  - StorageDsc
  - SqlServerDsc
  - xNetworking
  - SqlServer

Operating system

Windows

PowerShell version

azure-powershell.4.4.1.msi

SqlServerDsc version

SqlServerDsc: 17.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is an enhancement request.help wantedThe issue is up for grabs for anyone in the community.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions