BookmarkSubscribeRSS Feed

Start/Stop all SAS Services in Windows using Batch File

Started ‎12-18-2019 by
Modified ‎12-20-2019 by
Views 6,936

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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags