SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Can't connect to AS from Script Task


Can't connect to AS from Script Task

Author
Message
crsundstrom
crsundstrom
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 239
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.
stevefromOZ
stevefromOZ
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: Moderators
Points: 3582 Visits: 3757
Is the SSAS the base instance or a named instance?

Steve.
crsundstrom
crsundstrom
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 239
There's a multidimensional instance a tabular instance and a SQL server instance on the host.
stevefromOZ
stevefromOZ
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: Moderators
Points: 3582 Visits: 3757
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.
crsundstrom
crsundstrom
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 239
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.
crsundstrom
crsundstrom
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 239
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search