dsccommunity / dsccommunity/SqlServerDsc

Install SQL DB Engine only but failed to connect to Analysis Service

Open
#1,746 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
PowerShell
Stars
385
Forks
224
PR merge metrics
No merged PRs in 30d

Description

Problem description

I'm trying to install SQL server 2019 in Windows Server 2019 but failed to execute Test Target resource because of Analysis Service. Actually I don't have a plan to install AS in this instance.

Verbose logs
Failed to invoke DSC Test method: PowerShell DSC resource DSC_SqlSetup  failed to execute Test-TargetResource functionality with error message: System.InvalidOperationException: Failed to connect to Analysis Services instance 'xxxx'. (SQLCOMMON0021) ---> System.Management.Automation.MethodInvocationException: Exception calling "Connect" with "1" argument(s): "A connection cannot be made. Ensure that the server is running." ---> Microsoft.AnalysisServices.ConnectionException: A connection cannot be made. Ensure that the server is running. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:2383
DSC configuration
- name: Install SQL server
  win_dsc:
    resource_name: SQLSetup
    Action: Install
    SourcePath: "{{ src_dir }}"
    InstanceName: "{{ instance_name }}"
    InstallSharedDir: "{{ install_shared_dir }}"
    InstallSharedwowDir: "{{ install_shared_wow_dir }}"
    InstanceDir: "{{ instance_dir }}"
    SQLUserDBDir: "{{ sql_userdb_dir }}"
    SQLUserDBLogDir: "{{ sql_userdb_logdir }}"
    SQLTempDBDir: "{{ sql_tempdb_dir }}"
    SQLTempDBLogDir: "{{ sql_tempdb_logdir }}"
    SqlTempdbFileCount: "{{ sql_tempdb_file_count }}"
    SqlTempdbFileSize: "{{ sql_tempdb_file_size }}"
    SqlTempdbFileGrowth: "{{ sql_tempdb_file_growth }}"
    SqlTempdbLogFileSize: "{{ sql_tempdb_logfile_size }}"
    SqlTempdbLogFileGrowth: "{{ sql_tempdb_logfile_growth }}"
    SQLBackupDir: "{{ sql_backup_dir }}"
    Features: "{{ features }}"
    SQLCollation: "{{ sql_collation }}"
    AgtSvcStartupType: "{{ agent_svc_startup_type }}"
    BrowserSvcStartupType: "{{ browser_svc_startup_type }}"
    SQLSvcAccount_username: "{{ sql_svc_acc_username }}"
    SQLSvcAccount_password: "{{ sql_svc_acc_password }}"
    AgtSvcAccount_username: "{{ agent_svc_acc_username }}"
    AgtSvcAccount_password: "{{ agent_svc_acc_password }}"
    SQLSysadminAccounts: "{{ sql_sa }}"
    UpdateEnabled: "{{ update_enabled }}"
Suggested solution

Have no idea

SQL Server edition and version
I'm going to install SQL Server 2019 and fail so no SQL version available yet
SQL Server PowerShell modules
Name      Version    Path
----      -------    ----
SqlServer 21.1.18256 C:\Program Files\WindowsPowerShell\Modules\SqlServer\21.1.18256\SqlServer.psd1
Operating system
OsName               : Microsoft Windows Server 2019 Datacenter 
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434 
OsLanguage           : en-US
OsMuiLanguages       : {en-US}
PowerShell version
Name                           Value
----                           -----
PSVersion                      5.1.17763.2867
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.2867
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
SqlServerDsc version
Name         Version Path
----         ------- ----
SqlServerDsc 15.1.1  C:\Program Files\WindowsPowerShell\Modules\SqlServerDsc\15.1.1\SqlServerDsc.psd1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SQLSetup DSC resource and the Test-TargetResource failure in the provided logs, comparing the requested Features value with the attempted Analysis Services connection. Reproduce the SQL Server 2019 installation configuration on Windows Server 2019 and determine why Analysis Services is checked when it is not requested. Done means the SQL Database Engine-only configuration completes without requiring an Analysis Services connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.