ExecuteWithResults 异常?

问题描述

我正在运行以下命令作为 DB Log Shipping POC 的一部分,但出现异常:

$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 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

这里可能有什么问题?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)