dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

Get-DbaDbBackupHistory - exception on data source length in connection

Open Venkat20241985 opened this issue 2 months ago • 9 comments

Verified issue does not already exist?

No, I did not search

What error did you receive?

WARNING: [03:57:55][Get-DbaDbBackupHistory] Failure | The value's length for key 'Data Source' exceeds its limit of '128'. PS>TerminatingError(): "System error."

DBATools version 2.1.14

Steps to Reproduce

# provide your command(s) executed pertaining to dbatools
# please include variable values (redacted or fake if needed) for reference
    $FullSync    = $null
    $FullSync    = @()
    $minusdays   = 14;
    $minus14days = (Get-Date).Adddays(-($minusdays))
         $FullSync    += Get-DbaDbBackupHistory -SqlInstance $src -Database $SouceDatabase -Last -IncludeCopyOnly -Since  $minus14days

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

PS G:\PS\DB Restores DBA Tools> Get-InstalledModule dbatools

Version Name Repository Description


2.1.14 dbatools PSGallery The community module that enables SQL Server Pros to automate database development and server administration

Other details or mentions

No response

What PowerShell host was used when producing this error

Windows PowerShell (powershell.exe)

PowerShell Host Version

PS G:\PS\DB Restores DBA Tools> $PSVersionTable

Name Value


PSVersion 5.1.17763.5696
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.5696
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 2022 (RTM-CU12-GDR) (KB5036343) - 16.0.4120.1 (X64) Mar 18 2024 12:02:14 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2019 Datacenter 10.0 <X64> (Build 17763: ) (Hypervisor)

.NET Framework Version

PS G:\PS\DB Restores DBA Tools> Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where PSChildName -Match '^(?!S)\p{L}' | Select PSChildName, version

PSChildName Version


v2.0.50727 2.0.50727.4927 v3.0 3.0.30729.4926 Windows Communication Foundation 3.0.4506.4926 Windows Presentation Foundation 3.0.6920.4902 v3.5 3.5.30729.4926 Client 4.8.03761
Full 4.8.03761
Client 4.0.0.0

Venkat20241985 avatar May 15 '24 09:05 Venkat20241985