Skip to content

Commit

Permalink
Copy-DbaDbTableData: Add missing database parameter when connecting t…
Browse files Browse the repository at this point in the history
…o target (#9193)
  • Loading branch information
andreasjordan authored Jan 2, 2024
1 parent b36ddcf commit e6941ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/Copy-DbaDbTableData.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e6941ec

Please sign in to comment.