on 09-29-2015 9:59 AM
Hi,
We have an SAP system mounted on a Linux machine and want to reset and start sap automatically using a script or some other way in which I did not ask for the user's password <adm>.
Do you know some method to do this?
Thanks
Regards
Hello,
You would need to ensure that the database is started first.
Otherwise, applying this suggestion would not help as SAP would start and stop right away, since the database is not running.
1) Install the "sapinit" script (if not already installed) per SAP note 823941;
2) Add the parameter "Autostart = 1" (case sensitive!) to the START profiles (or instance profiles in case your system does not use START profiles).
Regards,
Isaías
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello José,
In this case I believe you would have to create a custom script that starts the database first, confirms that it was started successfully (if "R3trans -d" returns 0 that is confirmed), and then starts SAP.
How to start the database will depend on which database system is in use.
I do not have such script.
Regards,
Isaías
PS: if the database is running on the same server as SAP, maybe creating a script the switches to <sid>adm and executes "startsap" would be enough?
Hi Isaias,
I create this script:
#!/sbin/sh
#
# Start SAP
su - <SIDadm> -c "lsnrctl start"
su - <SIDadm> -c "startsap"
echo "CORRECT"
But if I execute it directly it does not do anything to me, I have to do it across Linux's terminal in which he asks me for password of the user <SIDadm>, hereby if it leaves me.
But if I execute it directly it does not do anything to me, I have to do it across Linux's terminal in which he asks me for password of the user <SIDadm>, hereby if it leaves me. But what really I want is to know if it forms someone of that when I restart the servant, east SAP completely, probably it is something that it is not possible to do automatic. I have searched very much in the forums and have not found anybody who has done it.
Thanks you in advance
Regards
Hi Prithviraj,
This blog already checks it, but I do not deal very well like to do it, inside the route:/etc/init.d/sap would there be necessary to add the parameters inside the file sapini and later of the parameters that already it has? Or would there be necessary to create a file in white only with these parameters?
I have tried to add it with my <SIDadm> but on having restarted the servant does not start sap.
Might it detail do it to me like in order that it works?
Thank you very much
Regards
Hi Jose,
you can check for the sapcontrol Command lines to start and check the status of the services also after the startup.
Please find below links for same.
also the sapstartsrv is auto started using init.d in Linux. so it will be easy to use sapcontrol mechanism.
And use sudo su and ssh if you want to remotely do this activity.
Let us know if you need further help. and yes as mention in earlier reply you need to take help from you linux admins.
Regards,
Ram
Hi Ram,
The Linux system we have if you have the sapinit script located in the /etc/init.d route.
I applied the steps outlined in this link:
All Agents of the Host | If you want to start or stop all SAP NetWeaver management agents on a host, call the sapinit script with the following parameters: sapinit stop sapinit start Note The command sapinit stop also shuts down all instances on the relevant host, since the command is mainly used for the shutdown of the host. In the same way, sapinit start starts the instances on the host, although only if the profile parameterAutostart=1 is set for this instance. Depending on the type of UNIX, the sapinit start script is at the following path:
|
If i run sapinit stop works.
The problem I have when I start it, I first added the parameter Autosart=1 n the instance profile, but doesn´t start. The process disp+work is stopped.
Do you know if that parameter must add in all the profiles?
Thanks
Regards
Hi Jose,
Make sure you have things in place as mentioned in the below sap note..
823941 - SAP start service on Unix platforms
Regards,
Prithviraj.
Hi Prithviraj,
The file path Sapinit is correct: /etc/init.d/sapinit
I have reviewed the note 823941 and all parameters are correct, but I don´t know if i have to change something but that SAP starts automatically after a reboot of the machine.
I tried to add the parameter: Autostart=1 in the instance profile, but now SAP not start and the process "disp+work" is stopped.
Thanks
Regards
Hi Prithviraj,
The file path Sapinit is correct: /etc/init.d/sapinit
I have reviewed the note 823941 and all parameters are correct, but I don´t know if i have to change something but that SAP starts automatically after a reboot of the machine.
I tried to add the parameter: Autostart=1 in the instance profile, but now SAP not start and the process "disp+work" is stopped.
Thanks
Regards
Hi Prithviraj,
The file path Sapinit is correct: /etc/init.d/sapinit
I have reviewed the note 823941 and all parameters are correct, but I don´t know if i have to change something but that SAP starts automatically after a reboot of the machine.
I tried to add the parameter: Autostart=1 in the instance profile, but now SAP not start and the process "disp+work" is stopped.
Thanks
Regards
Hi,
When I add the parameter Autosart=1 in the instance profile will not start when you restart SAP not even if I run it manually, I had to use a backup instance profile that not have this parameter and copying it to the Profiles folder.
Whereby the problem is that the parameter does not work correctly.
I'll do it again and check the logs that you indicate.
thanks
regards
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.