I am running the following command as part of DB Log Shipping POC but getting exception:
$params = @{
SourceSqlInstance = 'localhost'
DestinationSqlInstance = 'localhost\MSSQLSERVER01'
Database = 'Test'
GenerateFullBackup = $true
BackupNetworkPath = '\\sql1\logshipping'
BackupLocalPath = 'C:\Users\...\Documents\DB Log Shipping\Backups'
CompressBackup = $true
Force = $true
}
Invoke-DbaDbLogShipping @params
Exception:
Exception calling "ExecuteWithResults" with "1" argument(s): "An exception occurred while executing a Transact-SQL statement or batch."
At C:\Program Files\WindowsPowerShell\Modules\dbatools\1.0.173\allcommands.ps1:78578 char:17
+ ... $batchresult = $server.ConnectionContext.ExecuteWithResul ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ExecutionFailureException
Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\dbatools\1.0.173\allcommands.ps1:78580 char:25
+ ... if ($batchresult.Tables.rows[0] -eq $true -or $batchresult.Ta ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
What could be the issue here?