Can't connect to AS from Script Task

  • I've built a SSIS package using SSDT and VS2010 that manages partition creation and processing for a cube in Analysis Services (SSAS 2012). It processes the dimensions as well.

    My cube is partitioned by workweek. Within a Script Task I'm using AMO to connect to the AS server and determine if a new partition is needed and if it is then I update a couple XMLA scripts with the new partition name and use them later to create (using an AS execute DDL task) and then process (using an AS processing task) the new partition.

    When I run the package from my workstation (W7 64bit) it runs fine. However, when I deploy the package to the catalog on our SSIS server (SSIS 2012) and run it the package fails. The only error I had initially was "The script returned a failure result.". Not very helpful.

    After adding some additional logging code I determined the problem is occurring when I try to connect to the AS server:

    Microsoft.AnalysisServices.Server objServer = new Microsoft.AnalysisServices.Server();

    objServer.Connect(ServerName);

    The error I'm getting is "A connection cannot be made. Ensure that the server is running.". I have tried mucking about with the connection properties but to no avail. I have run it directly from the SSIS catalog with no luck. I ran it using a SQL Server Agent job (because the agent process runs under a network account that I know has access to the AS server) but that didn't work either. I created a proxy on our SSIS server and used my Windows credentials (I'm an admin on the AS server) to execute the package but sadly no connection.

    The SSIS 11.0 service is running under the NT Service\MsDtsServer110 account (I think this is a virtual account created by the install). I watched the server processes as I ran the package from the catalog and it looked like the SSIS service spawns another exe called ISServerExec to run the package. Surprisingly task manager said that ISServerExec was running under my Windows account but as I mention above it did not connect.

    I know it's possible to connect to AS from a package running on the SSIS server because prior to adding the partitioning code I was simply processing the cube dimensions and a single fact table partition using two Analysis Services Processing Tasks and they ran without any problems. As a matter of fact, I added the partitioning code to the same package so I know my Connection Managers are good. This issue only occurs when using the Script Task and AMO.

    I need help! I have spent all day banging my head against this problem and I'm starting to get dizzy. Any information/suggestions would be greatly appreciated.

    Thanks,

    Chris.

  • Is the SSAS the base instance or a named instance?

    Steve.

  • There's a multidimensional instance a tabular instance and a SQL server instance on the host.

  • Assuming the tabular is the named instance? Was just wondering if you were hitting issues with the parameter value for the name. Just for kicks, try hard-coding it? btw, if the molap engine is the named instance (that you're trying to hit), you'll possibly need double slash, to escape the slash in the named instance e.g server\\instance rather than server\instance.

    Steve.

  • I tried hardcoding the server name but got the same result: "Error: The script returned a failure result."

    In this same package are the two Analysis Services Processing Tasks that I used to process dimensions and the cube before partitioning the cube. If I enable these two tasks and deploy the package it will run successfully. There's just something different about the Script Task.

    Chris.

  • I found the problem! In VSTA I had referrenced version 10.50.1600.1 of the AnalysisServices.dll. My SSIS server is version 2012 so it has version 11.0.3000.0 of the AnalysisServices.dll installed but not version 10.50.1600.1. I changed the reference to version 11.0.3000.0 in VSTA, deployed my package to the SSIS server and it ran successfully.

    Chris.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply