SAS Communities Library

We’re smarter together. Learn from this collection of community knowledge and add your expertise.
BookmarkSubscribeRSS Feed

Start/Stop all SAS Services in Windows using Batch File

Started ‎12-18-2019 by
Modified ‎12-20-2019 by
Views 7,299

In Linux or Z/OS we can use sas.servers script in LevX directory to operate all SAS Servers from just one command (./sas.servers start/stop).

But for windows, we don’t have any script like that which can start or stop all the SAS Services using Batch file.

 

To make the operating SAS Services effortless for Windows Admins, I have created two batch files to start and stop all SAS Services with other SAS services dependencies.

 

These scripts will start/stop SAS Services in correct order, and these scripts can be customized easily for environment- specific needs by anyone who has a little Windows Batch Scripting knowledge.

 

Please view the GIF below to see how these scripts work.

 

Preview of starting SAS Services using "Start SAS Services.bat" file:

 

Start_Services.gif

 

Preview of stopping SAS Services using "Stop SAS Services.bat" file:

 

Stop_Services.gif

 

You can download both scripts from the attachment.

Comments

Thanks for sharing this. I remember you had posted this earlier as a post in the admin community. It's really helpful to automate start/stop of services in win platform.

@AnandVyas You're Welcome, and yes, I've posted this content before as a question but it was not well organized in context of Knowledge Base Article, for that reason only I've posted this article,

Also, one more good thing about posting this as an Article is that anyone else who've updated this code or have a better version of this, they can also update this content by Community Manager's Approval.

@Kalind_Patel  - Thanks for posting. I'm hopeful that the sas.servers script will eventually be enhanced to include Windows. I appears to be one of  the improvements being considered.

@SASKiwi I'm hoping for the same, sas.servers script makes the SAS Service operations very easy and non-interactive in many cases.

Thanks alot,

Regards,

BBBootstrap

Very Helpful content...Thanks... 

why it is not possible to restart the LSF services in the same way , even though LSF and SAS services share the logon as startup.

Version history
Last update:
‎12-20-2019 11:55 AM
Updated by:

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags