Monday, 15 September 2014

ssis - SSAS Tabular model error - exception has been thrown by the target of an invocation upon restart -



ssis - SSAS Tabular model error - exception has been thrown by the target of an invocation upon restart -

we using tabular model in ssas. part of daily cube processing(process full), there step in etl, restarts analysis service on cube server(to clear memory). here face intermittent issue. analysis service stops not turn sometimes(2 times out of 5). error receive is

exception has been thrown target of invocation

so has log in server , manually start service. mentioned, error not occur every day.

note

we have nlb on 2 ssas nodes(2 physical load balancing ssas servers) synced every day during cube processing. error above takes place on either 1 of them.

code restarts ssas

public void main() { process[] processarray = process.getprocessesbyname("mssqlserverolapservice", dts.variables["processservername"].value.tostring()); foreach (process process in processarray) //kill instances of ssas process { process.kill(); process.waitforexit(); //wait process killed } servicecontroller service = new servicecontroller("mssqlserverolapservice", dts.variables["processservername"].value.tostring()); if (service.status != servicecontrollerstatus.stopped && service.status != servicecontrollerstatus.stoppending) //check create sure killed process resulted in stopped service { service.stop(); } service.waitforstatus(servicecontrollerstatus.stopped); service.start(); //restart ssas service thread.sleep(convert.toint32(dts.variables["servicerestartdurationseconds"].value.tostring()) * 500); service.waitforstatus(servicecontrollerstatus.running); connectionmanager cm = dts.connections["aw cube process"]; string connectionstring = cm.connectionstring.tostring(); adomdconnection adomdconn = new adomdconnection(connectionstring); adomdconn.open(); //this kick starts loading tabular model info memory thread.sleep(convert.toint32(dts.variables["servicerestartdurationseconds"].value.tostring()) * 500); dts.taskresult = (int)scriptresults.success; }

questions

1) possible reasons error?

2) reason analysis service restarted clear memory of old model , reload tabular model memory. want avoid if possible. improve way or workaround exist replace restart of analysis service?

let me know if need more information.

thanks!

ssis sql-server-2012 ssas cube ssas-2012

No comments:

Post a Comment