Thursday, March 8, 2012

Automated restart of Analysis Services

Hello,

I need to put the Analysis server in local mode only while my jobs process cubes on Saturday morning.

I can script the property but I do not know how to automatically restart the service.

Any idea?

Thanks

Philippe

<Alter AllowCreate="true" ObjectExpansion="ObjectProperties" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">

<Object />

<ObjectDefinition>

<Server xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2">

<ID>SMDEV</ID>

<Name>SMDEV</Name>

<ServerProperties>

<ServerProperty>

<Name>Network\ListenOnlyOnLocalConnections</Name>

<Value>true</Value>

</ServerProperty>

</ServerProperties>

</Server>

</ObjectDefinition>

</Alter>

You can create a simple batch file and use there commands "net start MSSQLSErverOlapservice"

and "net stop MSSQLSErverOlapservice".

Another way, you can write a simple C# application using ServiceController inteface. Take a look here; http://msdn2.microsoft.com/en-us/library/sywbez17.aspx

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment