From e6941ec910a81a6afc94a3f15170d09e5d7ff84f Mon Sep 17 00:00:00 2001 From: Andreas Jordan <66946165+andreasjordan@users.noreply.github.com> Date: Tue, 2 Jan 2024 14:32:58 +0100 Subject: [PATCH] Copy-DbaDbTableData: Add missing database parameter when connecting to target (#9193) --- public/Copy-DbaDbTableData.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/Copy-DbaDbTableData.ps1 b/public/Copy-DbaDbTableData.ps1 index accdeb7abc..34a6502e52 100644 --- a/public/Copy-DbaDbTableData.ps1 +++ b/public/Copy-DbaDbTableData.ps1 @@ -320,7 +320,7 @@ function Copy-DbaDbTableData { foreach ($destinstance in $Destination) { try { - $destServer = Connect-DbaInstance -SqlInstance $destinstance -SqlCredential $DestinationSqlCredential + $destServer = Connect-DbaInstance -SqlInstance $destinstance -SqlCredential $DestinationSqlCredential -Database $DestinationDatabase } catch { Stop-Function -Message "Failure" -Category ConnectionError -ErrorRecord $_ -Target $destinstance -Continue }