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
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 -
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 AMI 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. -
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 : - ).
-
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 -
[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 -
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. -
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 -
Start/Stop Weblogic Admin Server
Hello,
I have installed Forms 11g in my home Pc, so is it possible to Start/Stop Weblogic Admin Server and the Dos window that appears, not to ask me about username and password?
I mean like a bat file (script), to enter the username and password in a text file
if yes, also the same in WLS_FORMS?
Thank you.Starting an Administration Server with a Startup Script
An Administration Server is a WebLogic Server instance that maintains configuration data for a domain. In a development environment, it is usually sufficient to start an Administration Server and deploy your applications directly onto the Administration Server. In a production environment, you create Managed Servers to run applications. For more information about Administration Servers and Managed Servers, see "Understanding WebLogic Server Domains" in Understanding Domain Configuration for Oracle WebLogic Server.
You can start an Administration Server with a default startup script or create your own. To start an Administration Server with the WebLogic Server-included startup script:
If you have not already done so, use the Configuration Wizard or WebLogic Scripting Tool (WLST) to create a domain.
See Creating Domains Using the Configuration Wizard or "Creating Domains Using WLST Offline" in Oracle WebLogic Scripting Tool.
Open a shell (command prompt) on the computer on which you created the domain.
Change to the directory in which you located the domain.
By default, this directory is MW_HOME\user_projects\domains\DOMAIN_NAME, where DOMAIN_NAME is the root directory of the domain. (The name of this directory is the name of the domain.)
Run one of the following scripts:
bin/startWebLogic.cmd (Windows)
bin\startWebLogic.sh (UNIX and Windows. On Windows, this script supports the MKS and Cygnus BASH UNIX shell emulators.)
Note:
If you use a Configuration Wizard template that is provided by WebLogic Server, your domain directory includes a start script named startWebLogic. If you use a domain template from another source, the wizard might not create a start script, or it might create a script with a different name. The template designer determines whether the wizard creates a start script and the name of the script.
The startWebLogic script does the following:
Sets environment variables by invoking DOMAIN_NAME\bin\setDomainEnv.cmd (setDomainEnv.sh on UNIX), where DOMAIN_NAME is the directory in which you located the domain; for example, WL_HOME\user_projects\domains\DOMAIN_NAME, and where WL_HOME is the location in which you installed WebLogic Server.
Invokes the java weblogic.Server command, which starts a JVM that is configured to run a WebLogic Server instance.
When the server successfully completes its startup process, it writes the following message to standard out (which, by default, is the command window):
<Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
Starting an Administration Server from the Windows Start Menu
When you create an Administration Server on a Windows computer, the Configuration Wizard creates a shortcut on the Start Menu for starting the server (User Projects > DOMAIN_NAME > Start Admin Server for WebLogic Server Domain).
The command that the Configuration Wizard adds to the Start menu opens a command window and calls the startup script that is described in Starting an Administration Server with a Startup Script. When the server has successfully completed its startup process, it writes the following message to standard out (which, by default, is the command window):
<Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
Mark this helpful/correct to help others too -
Scripts for starting/stopping managed servers
All,
Could someone provide me with some sample scripts for starting/stopping managed Weblogic servers? I'm specifically looking for ways to start/stop them WITHOUT starting the AdminServer. I'm running WLS 10.3.6 on Windows Server 2003, and I have NodeManager set to start automatically as a Windows service.
I know how to set my managed servers up as Windows services so that they will start automatically at boot, but this requires the AdminServer to be running, which I do not want. I just want a few scripts for starting/stopping the managed servers (and maybe some hints as to how to make them start automatically without starting the AdminServer).
Thanks in advance,
TomHello Puneet,
Admin console is an web application deployed into AdminServer. Hence if you shutdown AdminServer then you wouldn't able to access Admin console.
Managed Server would function in MSI mode, however you will not be able to make any configuration or administration activities like deployment , any configuration changes , etc.
Hello PRISM,
Can you confirm your requirement about why you don't want AdminServer to be running?
As I said, you will loose the administration capability if you don't have admin server running.
Regards
Rosario -
Shell script to start, stop and restart a JAR
Hi everyone,
Does anyone have idea to write a shell script to start, stop and restart a JAR under linux? it can indicate a method or parameter? Thanks!
this JAR inculdes a class with main method like this:
public class Client(){
public Client(String name){
public void stopClient(){
public static void main(String[] args){
new Client("/tmp/text.log");
}Does anyone have idea to write a shell script to
start, stop and restart a JAR under linux? That part isn't really clear.
Start would be java -jar myjar.jar.
Stop could either be kill, which kills the whole process; kill -TSTP, which suspends the process, or some application-specific communication such as sending something over a port; or putting something into a file or something.
Restart could just be the same as start (if stop is just kill); kill -CONT, if stop was kill -TSTP; or some other app-specific communication. -
Shell script to start, stop and restart a JAR under linux
Hi everyone,
Does anyone have idea to write a shell script to start, stop and restart a JAR under linux? it can also indicate a method or parameter? Thanks!
this JAR inculdes a class with main method like this:
public class Client(){
public Client(String name){
public void stopClient(){
public static void main(String[] args){
new Client("/tmp/text.log");
}Does anyone have idea to write a shell script to
start, stop and restart a JAR under linux? That part isn't really clear.
Start would be java -jar myjar.jar.
Stop could either be kill, which kills the whole process; kill -TSTP, which suspends the process, or some application-specific communication such as sending something over a port; or putting something into a file or something.
Restart could just be the same as start (if stop is just kill); kill -CONT, if stop was kill -TSTP; or some other app-specific communication.
Maybe you are looking for
-
Satellite A60-652: ati2dvag driver has stopped working
Hello, Recently I have some problems with my graphics. My satellite freezes up, and goes to a low resolution with a few colours. A message says the ati2dvag driver has stopped working. After rebooting the satellite shows a blue screen and reboots...s
-
I have a Vixia HF R400. Which recording mode would be best for editing the video on the computer with editing software such as Abobe Premiere Pro? I don't want to do Blu-ray, just burn to standard DVD. Would Mp4 be the best or what would be my option
-
SENDING 2 DIFFERENT SPOOLS IN SINGLE MAIL
Hi Frineds, i am writing a report for 2 Spools(PDF FILES ) and sending into the mails sucessfully. problem is : when i am sending MAIL 2 SPOOLS to One person they ARE COMING ONE BY ONE INTO MAIL. BUT MY REQUIREMENT IS WHEN I AM EXECUTING THE REPORT T
-
Hey guys, please tell me if my Lenovo ThinkPad T520 product id 4243-X03 has a Bluetooth adapter. Thanks a lot.
-
How can I get out of a support community. I posted once and now receive several posts day.