Skip to content

[Import-DbaCsv] Failure | Unable to load DLL "Microsoft.Data.SqlClient.SNI.x64.dll": The specified module could not be found. (Exception from HRESULT: 0x8007007E) #9630

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

Open
KCGL opened this issue Mar 21, 2025 · 2 comments
Labels
bugs life triage required New issue that has not been reviewed by maintainers

Comments

@KCGL
Copy link

KCGL commented Mar 21, 2025

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

I have a fresh install of dbatools on a Windows Server 2019 environment with SQL Server 2017 and SSMS 19.3.

Steps to Reproduce

Import-DbaCsv -Path "F:\Path\to\a*.csv.gz" -SqlInstance HOSTNAME -Database MyDB -Table TargetTable -Delimiter "|" -WhatIf

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

2.1.30

I've uninstalled dbatools via uninstall-module and reinstalled, error persists

Other details or mentions

This is the first command I've run from dbatools in this environment.

I also ran "Get-DbaDatabase -SqlInstance HOSTNAME" and got the same error about unable to load this DLL.

Initially was running in PowerShell ISE, but also ran under Windows PowerShell.

What PowerShell host was used when producing this error

Windows PowerShell ISE (powershell_ise.exe)

PowerShell Host Version

Name Value


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

SQL Server Edition and Build number

Microsoft SQL Server 2017 (RTM-CU31-OD) (KB5050533) - 14.0.3490.10 (X64) Feb 19 2025 12:19:28 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2019 Datacenter 10.0 (Build 17763: ) (Hypervisor)

.NET Framework Version

.NET Framework 4.8.4775.0

@KCGL KCGL added bugs life triage required New issue that has not been reviewed by maintainers labels Mar 21, 2025
@KCGL
Copy link
Author

KCGL commented Mar 21, 2025

I've since installed DBATools on 2 other hosts and the above commands work fine. The issue isn't an installation issue, but I have no idea how I would go about troubleshooting it on the original host. Suggestions would be most welcome, as I need dbatools to work on the original host.

@KCGL
Copy link
Author

KCGL commented Mar 21, 2025

I've manually copied the DLL above to C:\Windows\System32 as a workaround to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs life triage required New issue that has not been reviewed by maintainers
Projects
None yet
Development

No branches or pull requests

1 participant