1

我有一个 SSAS 多维数据集,我一直在通过 Octopus Deploy + 一些 PS 脚本自动部署它。

部署 SSAS 多维数据集的脚本如下所示:

function Deploy-Cube($databasePath)
{
    $executable = "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Microsoft.AnalysisServices.Deployment.exe"
    Write-Output "Deploying Cube"
    & $executable $databasePath "/s:Deploy.log"

    $process = Get-Process "Microsoft.AnalysisServices.Deployment"
    $process.WaitForExit()

    $log = Resolve-Path ".\Deploy.log"
    $output = [System.IO.File]::ReadAllText($log)

    if ($output.Contains("Error"))
    {
        Throw $output
    }
    else
    {
        $output | Write-Output
    }
}


$databasePath = $(Resolve-Path -Path ".\Cube.asdatabase").Path

Copy-Item ".\Cube.no-process.deploymentoptions" "Cube.deploymentoptions" -Force
Deploy-Cube -DatabasePath $databasePath

Copy-Item ".\Cube.full.deploymentoptions" "KK.Corporate.DataWarehouse.Cube.deploymentoptions" -Force
Deploy-Cube -DatabasePath $databasePath

Deploy.log 的输出是:

Connecting to the localhost server
Database, Cube, found on server, localhost. Applying configuration settings and options...
    Analyzing configuration settings...
    Done
    Analyzing optimization settings...
    Done
    Analyzing storage information...
    Done
    Analyzing security information...
    Done
Generating processing sequence...
Deploying the 'Cube' database to 'localhost'.
Internal error: The operation terminated unsuccessfully.
Server: The current operation was cancelled because another operation in the transaction failed.
Errors in the OLAP storage engine: An error occurred while the 'Dimension Item Id' attribute of the 'Sales' dimension from the 'Cube' database was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Item Description' attribute of the 'Items' dimension from the 'Cube' database was being processed.
OLE DB error: OLE DB or ODBC error: Operation canceled; HY008.
Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Dimension Dates', Name of 'Dates' was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Week' attribute of the 'Dates' dimension from the 'Cube' database was being processed.
OLE DB error: OLE DB or ODBC error: Operation canceled; HY008.
Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Dimension Items', Name of 'Items' was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Category' attribute of the 'Items' dimension from the 'Cube' database was being processed.
OLE DB error: OLE DB or ODBC error: Operation canceled; HY008.
Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'SalesTransactions', Name of 'SalesTransactions' was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Transaction Key' attribute of the 'SalesTransactions' dimension from the 'Cube' database was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Dimension Time Id' attribute of the 'Sales' dimension from the 'Cube' database was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Dimension Time Id' attribute of the 'Times' dimension from the 'Cube' database was being processed.

SSAS 日志的输出为:

(12/8/2014 12:24:42 PM) Message: OLE DB error: OLE DB or ODBC error: Operation canceled; HY008. (Source: \\?\C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log\msmdsrv.log, Type: 3, Category: 289, Event ID: 0xC1210003)
(12/8/2014 12:24:42 PM) Message: OLE DB error: OLE DB or ODBC error: Operation canceled; HY008. (Source: \\?\C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log\msmdsrv.log, Type: 3, Category: 289, Event ID: 0xC1210003)
(12/8/2014 12:24:42 PM) Message: OLE DB error: OLE DB or ODBC error: Operation canceled; HY008. (Source: \\?\C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log\msmdsrv.log, Type: 3, Category: 289, Event ID: 0xC1210003)

如果我尝试在 SSAS 中手动运行一个完整的进程,我会收到一条与 Deploy.log 一样神秘的错误消息。

我在本地和 CI 服务器上运行完全相同的部署过程。三个环境中的权限是相同的,它适用于 3 个环境中的 2 个。

这是什么原因造成的?有什么我可以解决的吗?

4

1 回答 1

3

As suggested by Tab Alleman, I tried manually performing a full process of the cube. I unfortunately don't have the error message on hand, but it said something to the effect of "An internal error has occurred."

On a hunch, I restarted the SSAS instance and tried the full process a second time. The second time around SSAS correctly reported what error was causing it to fail.

In short: If you're getting no useful errors or vague error messages back from SSAS, try restarting the instance and processing it manually.

于 2014-12-08T19:12:38.900 回答