0

我正在运行以下命令作为 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

这里可能是什么问题?

4

0 回答 0