Windows SAP Start/Stop Scripting
Hi all,
We are working in SAP Start/Stop Scripts in Windows + SQL Platform.
We need some help from your side.We run the command to stop SAP & then SAP is stopped.If SAP is not stopped,next service stop command should not run.
How can i write in Script & also from which command for SAP Stop. I can get the RC.
Please help me on this ?
Thanks,
Richa
Edited by: Richa Saran on Sep 14, 2011 9:18 AM
Edited by: Richa Saran on Sep 14, 2011 9:18 AM
I run the command sapcontrol -nr %erppno% -prot PIPE -function StopWait 60 10.
SAP Stopped in MMC .
My Next Command is stop SAP Services {NET STOP %servicename% (SAPSID_NO)}
I want to write the command in Script that NET STOP command will be detect or check that SAP Instance is stopped & then run Service stop command.
Please help me on this topic.
Similar Messages
-
Problem with auto start-stop script
Hi to All,
Logged as root. I have create in /etc/rc.d/init.d this file and saved as dbora (Oracle Linux 5.4):
+#!/bin/sh+
+# chkconfig: 345 99 10+
+# description: Oracle auto start-stop script.+
+#+
+# Set ORA_HOME to be equivalent to the $ORACLE_HOME+
+# from which you wish to execute dbstart and dbshut;+
+#+
+# Set ORA_OWNER to the user id of the owner of the+
+# Oracle database in ORA_HOME.+
ORA_HOME=/u01/app/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
+if [ ! -f $ORA_HOME/bin/dbstart ]+
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
+'start')+
+# Start the Oracle databases:+
+# The following command assumes that the oracle login+
+# will not prompt the user for any values+
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
touch /var/lock/subsys/dbora
+;;+
+'stop')+
+# Stop the Oracle databases:+
+# The following command assumes that the oracle login+
+# will not prompt the user for any values+
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
rm -f /var/lock/subsys/dbora
+;;+
esac
After creation I have execute:
*#chmod 750 /etc/rc.d/init.d/dbora*
*#chkconfig --add /etc/rc.d/init.d/dbora*
The last command return this message:
+"service dbora does not support chkconfig"+.
Can You help me? Have You an idea ?
Thank You and best regards
Gaetanosb92075 wrote:
Oracle RDBMS needs to be started by process running at OS level as owner of Oracle software; typically OS user "oracle" & not as ROOT!Ok,
But I have founded this script at [http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php].
The article report:
Article
When using RAC or ASM under Oracle 10g Release 2 or above, the Oracle Clusterware automatically starts and stops the Oracle database instances, so the following procedures are not necessary. For all other cases, you can use the methods described below.I must suppose, that the author has written an incorrect article?
Best Regards
Gaetano -
Hi to All,
I have create as root in /etc/init.d the file dbora:
+#!/bin/sh+
+# chkconfig: 345 99 10+
+# description: Oracle auto start-stop script.+
+#+
+# Set ORA_HOME to be equivalent to the $ORACLE_HOME+
+# from which you wish to execute dbstart and dbshut;+
+#+
+# Set ORA_OWNER to the user id of the owner of the+
+# Oracle database in ORA_HOME.+
ORA_HOME=/u01/app/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
+if [ ! -f $ORA_HOME/bin/dbstart ]+
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
+'start')+
+# Start the Oracle databases:+
+# The following command assumes that the oracle login+
+# will not prompt the user for any values+
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
touch /var/lock/subsys/dbora
+;;+
+'stop')+
+# Stop the Oracle databases:+
+# The following command assumes that the oracle login+
+# will not prompt the user for any values+
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
rm -f /var/lock/subsys/dbora
+;;+
esac
After I have execute:
*#chmod 750 /etc/init.d/dbora*
*# ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora*
*# ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora*
*# ln -s /etc/init.d/dbora /etc/rc.d/rc4.d/S99dbora*
*# ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora*
At last
*#chkconfig --add /etc/init.d/dbora*
This message is returned
dbora service don't support chkconfig.+
Have You an idea ?
Thank You and best regards
GaetanoSolved !
I have inserted a space before chkconfig and description in the script:
Incorrect Code:
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
This is the correct code
#!/bin/sh
#chkconfig: 345 99 10
#description: Oracle auto start-stop script.Bye
Gaetano -
Service start stop scripts and Nagios scripts
Hello. Are there some "official" service start stop scripts somewhere? And: Has somebody already written a Nagios monitoring script for Oracle NoSQL? Thanks, Jesus.
Hi. Yes, but I mean something like service kvclient start / stop / restart / status, and using e.g. daemon without nohup. Of course one can be written, e.g. I have a simple one based on a script I found in internet long time ago for Cassandra, but then by Murphy's Law you will probably have an "official" one in the .124 version : - ).
-
Where can i find start/stop scripts for all SAP instances
Hi,
I installed CI, DB and Dialog instance on a standalone S10 machine and i could see start scripts under /sapmnt/RAM/profile
START_DVEBMGS09_hostSAP
START_D24_hostSAP
But i cann't see stop scripts for the above and also i cann't see start and stop scripts for SAP DB instance. Could some one point me where i can find them when everything is installed on a single box.
Thanks,
RamUSAGE: STARTSAP.EXE name=<SID> nr=<SYSNR> SAPDIAHOST=<host>
FURTHER INFORMATION:
- The executable sapstart.exe must be in the same directory
when you start sap instacne, it will check db instance first, if db instance not start , it will automatic start db instance then sap instance.
vice visa :
stopsap is alos can be used. -
[Debian] Oracle 10g Express - init.d start/stop script problem + fix
I've experienced a problem with the init.d script "oracle xe" which is used to start/stop/reload the 10g server and comes with the debian package from oss.oracle.com.
I noticed that after installing Oracle 10g in the "Debian" way (via .deb package and an apt-source oss.oracle.com), the start and stop method of the script doesn't do anything.
It's checking for the value of the "ORACLE_DBENABLED" variable, which is on my installation set to "false", because I answered during installation false to the question "do you want to start Oracle 10g at system boot?".
In my opinion that's wrong. I should always be able to start/stop the Oracle server trough the init.d script regardless of your choice starting Oracle at boot or not.
I commented out row 604 and 621 in the file "/etc/init.d/oracle-xe" :
case "$1" in
start)
if test -f "$CONFIGURATION"
then
if test "$ORACLE_DBENABLED" != "true"
then
echo "exit"
# exit 0
fi
else
echo "Oracle Database 10g Express Edition is not configured. You must
exit 0
fi
start
configure)
configure
stop)
if test -f "$CONFIGURATION"
then
if test "$ORACLE_DBENABLED" != "true"
then
echo "exit"
# exit 0
fi
else
echo "Oracle Database 10g Express Edition is not configured. You must
exit 0
fi
stop
;;Hello,
I have the same problem on RH9.
[root@phpsrv init.d]# ./oracle-xe start
Starting Oracle Net Listener.
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl: relocation error: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/../lib/libclntsh.so.10.1: symbol semtimedop, version GLIBC_2.3.3 not defined in file libc.so.6 with link time reference
Starting Oracle Database 10g Express Edition Instance.
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus: relocation error: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/../lib/libclntsh.so.10.1: symbol semtimedop, version GLIBC_2.3.3 not defined in file libc.so.6 with link time reference
Failed to start Oracle Net Listener using /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr and Oracle Express Database using /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus.
Regards,
Pavel Kucera -
Weblogic Solaris SMF start/stop script
Does anyone have a Solaris SMF script to start/stop Weblogic they'd care to share? Thanks.
I don't think it matters but I'm running Solaris 10, Weblogic 10.3 and X86.In /etc/rc3.d (all the files in this script are executed at the time of server boot) you can keep a script called S99weblogic and add below line that file,
#!/bin/ksh
su - wladmin -c "/etc/init.d/start_weblogic.sh start"
and in /etc/init.d you can write script start_weblogic.sh, as below
#!/bin/ksh
case "$1" in
'start')
# for admin server
if [ -f <init log path>/startadmin.log ]
then
print -n "\t\n\n deleting <init log path>/startadmin.log\n\n"
/usr/xpg4/bin/rm -rf <init log path>/startadmin.log
fi
### like above do for manged servers logs also ( if you have different script formats for admin and managed servers) and startadmin.log contains paths to all the admin server scripts)
# boot logs when the instances are started which will contains error while the instances are started
if [ -f init log path/boot.err.log ]
then
print -n "\t\n\n deleting init log path/boot.err.log\n\n"
/usr/xpg4/bin/rm -rf init log path/boot.err.log
#contians the list of domains in your physical or virtual server
if [ -f init log path/domain_list.log ]
then
print -n "\t\n\n deleting init log path/domain_list.log\n\n"
/usr/xpg4/bin/rm -rf init log path/domain_list.log
#list all domain names in domain_list.log
#use below command to find all the domians scripts home, for weblogic 8 in ur physical server
# for weblogic 8
ls -d <path to user projects untill scripts home>/* > inint log path/domain_list.log
#if ur domain are scattered then append other domains also -for weblogic 9.x, 10.x.........
ls -d <path to user projects untill scripts home>/*/bin >> initn log path/domain_list.log
# get start up sctiprs
for file in `/usr/bin/cat init log path/domain_list.log`
do
ls $file/startadm*.sh >> init log path/startadmin.log
ls $file/startwl*.sh >> init log path/startmgd.log
fi
done
#start startup scritps
for file in `/usr/bin/cat init log path/startadmin.log`
do
cd `/usr/bin/dirname $file`
nohup $file >> init log path/boot.err.log 2>&1 &
#do the same for manged server sctips
done -
Common weblogic start/stop script
Hi,
We have Weblogic 8.1 on Solaris 8. We have lot of domains in the user_projects. Instead of shutting down and starting up each domain everytime. I would like to have a common weblogic start and stop script for all the domains. so that when I execute the script all the weblogic instances in each domain should be stopped or started up automatically.
I think lot of people would have implemented this. I appreciate if someone can help me in achieving this.
Thanks,
VaniIn /etc/rc3.d (all the files in this script are executed at the time of server boot) you can keep a script called S99weblogic and add below line that file,
#!/bin/ksh
su - wladmin -c "/etc/init.d/start_weblogic.sh start"
and in /etc/init.d you can write script start_weblogic.sh, as below
#!/bin/ksh
case "$1" in
'start')
# for admin server
if [ -f <init log path>/startadmin.log ]
then
print -n "\t\n\n deleting <init log path>/startadmin.log\n\n"
/usr/xpg4/bin/rm -rf <init log path>/startadmin.log
fi
### like above do for manged servers logs also ( if you have different script formats for admin and managed servers) and startadmin.log contains paths to all the admin server scripts)
# boot logs when the instances are started which will contains error while the instances are started
if [ -f init log path/boot.err.log ]
then
print -n "\t\n\n deleting init log path/boot.err.log\n\n"
/usr/xpg4/bin/rm -rf init log path/boot.err.log
#contians the list of domains in your physical or virtual server
if [ -f init log path/domain_list.log ]
then
print -n "\t\n\n deleting init log path/domain_list.log\n\n"
/usr/xpg4/bin/rm -rf init log path/domain_list.log
#list all domain names in domain_list.log
#use below command to find all the domians scripts home, for weblogic 8 in ur physical server
# for weblogic 8
ls -d <path to user projects untill scripts home>/* > inint log path/domain_list.log
#if ur domain are scattered then append other domains also -for weblogic 9.x, 10.x.........
ls -d <path to user projects untill scripts home>/*/bin >> initn log path/domain_list.log
# get start up sctiprs
for file in `/usr/bin/cat init log path/domain_list.log`
do
ls $file/startadm*.sh >> init log path/startadmin.log
ls $file/startwl*.sh >> init log path/startmgd.log
fi
done
#start startup scritps
for file in `/usr/bin/cat init log path/startadmin.log`
do
cd `/usr/bin/dirname $file`
nohup $file >> init log path/boot.err.log 2>&1 &
#do the same for manged server sctips
done -
Hello All,
We are using HP-UNIX & Oracle 10.2 for our ECC 6.0 System.Our Database team has scheduled offline backup daily at 8 pm but we stop/start ECC 6.0 only on every Tuesday by crontab Scripts to stop/restart sap system before/after backup.For Other days we do not stop the application.My question is whether we need to stop/start ECC 6.0 every week once??Is there any recommendation from SAP that application should be stopped/start once a week/month??Hi Ashley,
First of all answering to your first question
"My question is whether we need to stop/start ECC 6.0 every week once??Is there any recommendation from SAP that application should be stopped/start once a week/month??"
This has already been answered by couple of people. There is no recommendation regarding restarting the SAP system. This depends upon your IT infrastructure/ the memory and buffer usage.
You are really in a very good position to restart the SAP system daily, since you Database is going down for offline backup, there is no point in keeping the SAP System up. Reference to your below concern on the same recommended by some
"If I have 10 applications running on the same unix box along with SAP how I will manage the bufferes & the memory??My question is in HP-unix If 10 applicatiopns are running along with SAP Instance whether it is advisable to shut down SAP Instance to clean the buffers and clear the memory??"
Are these 9 Application infacing with SAP, Secondly, If I have understood right, you have the concern that shuting down SAP will may have impact on the memory being used by other 9 application. Please note that OS manages your memory. This is a starter concept that the OS allocates seprate segment of memory to every application. So shuting down SAP will only clear up the buffer & memory which was allocated to SAP only, so your rest of the application will remain intact.
Lastly, why are you not following the SAP recomendation for keeping the SAP system in a clean environment not with another 9 applications on the same system.
Hope this helps.
Regards,
Sanujit -
Location of reports server start/stop script.
Hiii..
can anyone tell me the location of reports server script in R12, so that i can restart the reports server.
And how can i restart the reports server..??
Thanks..As u told i have stopped and started the adopmnctl.sh script, but the status is showing down...y.???
[oravis@MSFTORA3 scripts]$ sh adopmnctl.sh start
You are running adopmnctl.sh version 120.6.12010000.3
Starting Oracle Process Manager (OPMN) ...
adopmnctl.sh: exiting with status 0
adopmnctl.sh: check the logfile /u03/oracle/VIS/inst/apps/VIS_msftora3/logs/appl/admin/log/adopmnctl.txt for more information ...
The following is the status o/p
[oravis@MSFTORA3 scripts]$ sh adopmnctl.sh status
You are running adopmnctl.sh version 120.6.12010000.3
Checking status of OPMN managed processes...
Processes in Instance: VIS_msftora3.msftora3.msftpnq.com
--------------------------------------------------------------+---------
ias-component | process-type | pid | status
--------------------------------------------------------------+---------
OC4JGroup:default_group | OC4J:oafm | N/A | Down
OC4JGroup:default_group | OC4J:forms | N/A | Down
OC4JGroup:default_group | OC4J:oacore | N/A | Down
HTTP_Server | HTTP_Server | N/A | Down
adopmnctl.sh: exiting with status 0
adopmnctl.sh: check the logfile /u03/oracle/VIS/inst/apps/VIS_msftora3/logs/appl/admin/log/adopmnctl.txt for more information ...
Thankss.. -
Script to start/stop all manager sever/Admin server
Hi Gurus,
I am new bee to weblogic and learning it on daily basic.
I have a scenario and would like to see if this is possible.
We have one server and have couple of applications are running like SOA,OSB, OSR etc. During any downtime, we have to shut down each Admin Server, Manage server one by one and take up. This take time and effort too.
Do we have some options through which we can configure all start/stop script in one file and do this work with few clicks. server shout down should be clean and take care of node manager recycle also.
Could you please advise me on this or pls point me towards some already documented solution. I goggled this but did not find.Thanks radoui for your response.
I see this approach as the default one.. Could you please advice me whats the correct sequence of shutting down the servers including node manager and starting back.
Like I have SOA installed.
So First I have to take down SOA managed server followed by Admin server and then node manager ..? Let me know if this is not correct.
I still have doubt on this approach as if, managed server failed to stop and means while script will take down admin server and so on.. -
Is there any way to start/stop OBIEE system components other than OPMN
We had some issues including OPMN into our watch dog process, does oracle provide start/stop scripts to manage system components or we have to rely on OPMN ?
Appreciate your help
~SrixCheck this link
http://www.cool-bi.com/CMDline/Individualservices.php
You can use ias-component name in the output to stop/start individual service
ex:
opmnctl startproc ias-component=coreapplication_obips1
Hope this helps, pls mark as correct if helps
Edited by: Srini VEERAVALLI on Jan 10, 2013 2:55 PM
Edited by: Srini VEERAVALLI on Jan 10, 2013 9:57 PM -
Multicamera Editing in CS4: Start / Stop Points Lost
I'm working on a larger project. I'm using multicamera switching in my sequences.
When I set a start and end point in my sequence, and then make a change in the Multi-Camera Monitor Window, the start/stop points are lost, and I have to find them again. This is extremely irritating, especially when the the project is in an advanced stage.
What was Adobe thinking in designing this behaviour, and what can I do about it?I suppose for now, I'll just change the camera in the clip's context menu, but you'd think there'd be a more mature way to handle this.
-
Batch / script file to start /stop sap server
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.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. -
Each time i open Firefox, i get a window opening saying:A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
Script: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsBrowserContentHandler.js:619
When i try again, i get the same result, if I continue, nothing happens for a few minutes then fire fox opens with awindow saying to start again.
== This happened ==
Every time Firefox opened
== I installed Firefox ==
== User Agent ==
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.30729; .NET CLR 3.5.30729)Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
You can use "Disable all add-ons" on the ''Safe mode'' start window.
You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")
Maybe you are looking for
-
How to get back deleted photos and contacts???
First time to sync iphone 4 to computer and I have accidently deleted all my photos and contacts! All the photos from my computer are now in albums on my iphone. Any help in how to get back deleted photos and contacts would be greatly appreciated. Th
-
Hi, Can any body explain me regarding Sequence number in an assignement tab page of a Production Order. Under what circumstannces it is used and How? Regards, Prasad
-
Importing Database from SQL Server into Oracle 8i
Hello Friends, Cuurentlly we are using SQL Server as our application database, Now we want to switch on at Oracle 8i,bcz of some problems, If anybody had done so,then please help me in solving this problem, I wana Import whole database from SQL serve
-
How do I export to 1920X1080 (HD 1080P) file?
I'm new to FCP X. The manual didn't help me to find my answer. The footage is shot in 1080p and I'm trying to figure out how to export the finished video in 1080p (1920X1080). Thanks for any help! Charles
-
Hii All, This is Dwaipayan... I have installed minisap 4.6c in my pc... my os is Win XP service pack 2.... i faced the follwing problem when i tried to logon.. description : MBS application server : my pc name sap syatem : R/3 system nu