on 05-04-2007 7:49 PM
Hi,
I would like to start/stop SAP server using batch file (in windows). I need this, whenever we have to shutdown the server and restart of the server, so that SAP will automatically shutdown and restart using batch files while server restart cases? If anyone knows, please let me know. Thanks,
Regards,
Sundar.
Which Windows is it?
If you registered SAP with Windows services then i would use commands like
net start servicename
net stop servicename
Go for it click on Start -> Run -> cmd -> net
NET
[ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START |
STATISTICS | STOP | TIME | USE | USER | VIEW ]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
create am cmd file like startsap.cmd or stopsap.cmd
example for startsap.cm
--- START ---
@echo off
net start servicename1
net start servicename2
net start servicename3
--- END ---
for servicename just enter the name from the service. You'll find that when you open the services MMC under service name.
Only make sure that you meet all service dependencies in your script.
Hi Sundar,
Did you got the scripts for windows to start and stop SAP. Can you please share that with me at
I would really appreciate ur help.
Thanks,
Iqbal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
for startup: let SAP[SID]_00 set aut AUTOMATIC start.
then in the start profile add:
AUTOSTART = 1
as for shutdown, put this in a script:
stopsap.exe name=%ORACLE_SID% nr=%SYSNR% SAPDIAHOST=%SAPLOCALHOST%
then, call shutdown.exe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
target of the 700 sapstartsrv improvement was to deliver identical functionality on all SAP platforms. As the DCOM programing model is only available on Windows platforms sapstartsrv.exe was enhanced by the WEB-Service interface and is available now on Unix too.
The DCOM SAPControl interface of sapstartsrv.exe is still existing, but only on Windows. Here you can use VB Script or any other programming language able to handle DCOM objects to write your own programs / scripts to interact with the SAPControl.
sapcontrol.exe is a command line program available since 700 which enables you control over nearly all functions of the sapstart service.
Even it has the same name as the DCOM interface it' something completly different.
regards
Peter
PS: sapcontrol syntax
usage: sapcontrol [
-prot GSOAP_HTTP| http using gsoap build in sockets (default)
NI_HTTP| http using SAP NI sockets (prefer Unix domain sockets)
NI_HTTPS| https using SAP NI sockets (prefer Unix domain sockets)
WINHTTP| http using Windows winhttp
WINHTTPS| https using Windows winhttp
PIPE Windows named pipes
]
[-user <user> <password>] OS user and password for Webservice authentication
[-repeat <N> <D>] Repeat Webmethod call <N> times (-1=forever) with <D> sec delay
[
-format list| List output format (default)
script Script output format
]
[-host <hostname>] Host to connect to (default: localhost)
-nr <instance nr.> SAP Instance number to connect to
-function <Webmethod> [parameter list]
Webmethods: Start
Stop [softtimeout sec]
Shutdown
RestartInstance [softtimeout sec]
StopService
StartService <SID>
RestartService
ParameterValue [<parameter>]
GetStartProfile
GetTraceFile
GetAlertTree
GetAlerts
GetEnvironment
GetVersionInfo
GetQueueStatistic
GetProcessList
GetInstanceProperties
ListDeveloperTraces
ReadDeveloperTrace <filename> <filesize>
ListLogFiles
ReadLogFile <filename> [<filter> [<language> [<maxentries> [<cookie>]]]]
AnalyseLogFiles [<severity 0-2>] [<maxentries>] [<starttime YYYY MM DD HH:MM:SS> <endtime YYYY MM DD HH:MM:S
S>]
OSExecute <command> <async> <timeout> <protocolfile>
SendSignal <pid> <signal>
GetSystemInstanceList
StartSystem [ALL|SCS|DIALOG|ABAP|J2EE|LEVEL <level> [<waittimeout sec>]]
StopSystem [ALL|SCS|DIALOG|ABAP|J2EE|LEVEL <level> [[<waittimeout sec>] [softtimeout sec]]]
RestartSystem [ALL|SCS|DIALOG|ABAP|J2EE|LEVEL <level> [[<waittimeout sec>] [softtimeout sec]]]
AccessCheck <function>
ABAPReadSyslog
ABAPReadRawSyslog
ABAPGetWPTable
J2EEControlProcess <processname> <function>
J2EEGetProcessList
J2EEGetThreadList
J2EEGetSessionList
J2EEGetCacheStatistic
J2EEGetApplicationAliasList
J2EEGetVMGCHistory
J2EEGetVMHeapInfo
StartWait <timeout sec> <delay sec>
StopWait <timeout sec> <delay sec>
WaitforStarted <timeout sec> <delay sec>
WaitforStopped <timeout sec> <delay sec>
Exitcode: 0: Last Webmethod call successfull
1: Last Webmethod call failed, invalid parameter
2: StartWait, StopWait, WaitforStarted, WaitforStopped timed out
3: GetProcessList succeeded, all processes running correctly
4: GetProcessList succeeded, all processes stopped
Security: Trusted connects without user and password check are possible through
Unix domain socket or Windows named pipes. Protected webmethods like
Start or Stop require a trusted connection or OS user and password
authentication.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.