cancel
Showing results for 
Search instead for 
Did you mean: 

Starting and Stopping SAP Systems and Instances on Windows

Former Member
0 Kudos

Is there a way to automatically stop/start instances on windows at boot time?

I don't want to have to logon after a reboot and go into the mmc and start the app manually.

Thanks,

Dan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for the input.

Dan

JPReyes
Active Contributor
0 Kudos

Sure, there is a way either by changing the start profile... but this is not recomended as you might found several situations where you don't want this to happen for example during system maintenance or DB maintainance or after a critical error, etc...

I can't find any advantage on starting the system at boot.

It's one of those cases where is much better doing it manually to prevent problems.

Regards

Juan

Former Member
0 Kudos

Juan,

Thanks for the input. We run a "lights out" shop and I want to be able to have the app start/stop on boot if the system admins want to reboot. I'm a unix guy and we're implementing on windows and they do a lot of reboots of the windows servers. We never reboot our aix boxes. I can't rely on someone being available to restart the app if they reboot a server. Do you know the details of automating the stop/start?

Thanks,

Dan

Former Member
0 Kudos

Dan ,

As Juan said it could cause problems while starting SAP at startup.

Still if you really want to implement this...

This is what I have found ... I never tried this but hope this should work.

1. you must make sure that SAP[SID]_00 service is set to start automatically.

2. you must edit your SAP START profile and add this line:

Autostart=1

3. make sure that the line you added IS NOT the last one in your file. if it is, your added parameter could be ignored.

to test this out, shutdown SAP and your database, then shutdown the SAP[SID]_00 service. now start it. open SAPMMC to see if you see any starting activity. it should work fine.

Let us know if it works.

Former Member
0 Kudos

you can start/stop sap-systems on windows automatically with a script.

Not sure, but as far as i know, you can define a job on os-level which will be started after booting.

For shutdown, put the sap-stopscript and a shutdown-command in one cmd-file make a link to the desktop and stop windows by doubleclicking this icon.

Sometime, the db-service is not starting fast enough (at least on some of our old windows servers) and then, the sap-start won't work. But at rebooting, we always stop/start the systems manually. The only time we use the scripts are the two times in the year, when the time changes from regular time to summer time and back.

Former Member
0 Kudos

I'm surprised I'm getting advice not to start/stop the app automatically. I've been supporting applications for over 20 years. The latest is a CIS app I've supported for the last 8 running on AIX and oracle and I have everything automated with ksh scripts. I have as much as I can automated so there's very little interaction by me. It just runs. I've never had a problem.

Am I getting this advice because it's SAP, or because we're running on windows SQLServer?

Thanks,

Dan

Former Member
0 Kudos

Hi,

There is no reason to not automate starts/stops using scripts on Windows.

We've done it successfully for the last 10 years.

Regards,

Olivier

Former Member

Does anyone use powershell to automate SAP admin activities on windows? If so what have you done?

Thanks,

Dan

Former Member
0 Kudos

Hi,

As I said the first relase of our scripts was written 10 years ago on windows NT 4.

So we still use .bat script files.

The language is ugly and unreadable (character string processing...) but it does the job !

Regards,

Olivier

Former Member
0 Kudos

Oliver - Could you share your stop and start bat scripts?

Thanks,

Dan

Former Member
0 Kudos

Dan,

I realize that you marked this as answered, but ended with a question sou2026

A script is not necessarily required to start on Windows as the autostart mentioned by @m!t works on reboots.

For shutdown, you could just make a .bat file out of the stopsap.exe command. For example:

stopsap.exe name=DEV nr=00 SAPDIAHOST=sapdev01

We donu2019t automate reboots, so we donu2019t script it, but this works via command prompt.

Hope this helps.

PJ

Former Member
0 Kudos

Hi,

>Oliver - Could you share your stop and start bat scripts?

Sorry, but it's not possible. Our scripts are very specific to our special needs and do a lot more than just starting or stopping the SAP system. They make a heavy use of specific configuration files and use so many variables that they are very difficult to read.

Regards,

Olivier