Automatic Startup and Shutdown Database (LINUX REDHAT)
Dear Experts,
I am facing problem after sucessfully installed oracle that the Linux is not starting oracle services at booting and does not shutting down oracle while shutdown or restart the linux Machine, please let me know further process regarding this topic.
Regards,
Oracle User.
Here is my DBORA script with permission 750.
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.
ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
if [ ! "$2" = "ORA_DB" ] ; then
if [ "$PLATFORM" = "HP-UX" ] ; then
remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"
exit
else
rsh $HOST -l $ORACLE $0 $1 ORA_DB
exit
fi
fi
case $1 in
'start')
$ORACLE_HOME/bin/dbstart $ORACLE_HOME
'stop')
$ORACLE_HOME/bin/dbshut $ORACLE_HOME
echo "usage: $0 {start|stop}"
exit
esac
exit
Similar Messages
-
Automatic Startup and Shutdown of EBS on OEL 5.5
Can anyone tell me how to start and stop all EBS services on oracle Enterprise Linux upon startup of the server or its shutdown. I don't mean go to the script adstpall.sh and manually make it happen. When the server boots, I need all of the services started and then when its shut down all of them stopped automatically. Need to put the scripts in rc.d directory?
Any help would be much appreciatedPlease see old threads for similar discussion -- http://forums.oracle.com/forums/search.jspa?threadID=&q=autostart+services&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
Startup and shutdown of Apps and database on R12 with linux server reboot
Hi Guys,
Version : R12
Platform : Linux EL 5
Hi Guys,
I am trying to startup and shutdown the R12 apps and database automatically with Linux server reboots.
Does any one have steps to do this or metalink note:
Thanks in advance,
ZHi,
Please see this thread.
Autostart of Services
Re: Autostart of Services
Regards,
Hussein -
Startup and shutdown of standby database
Hi
Expert,
i want to know step by step process of startup and shutdown of standby oracle 10g database on windows and linux server.
thanksAny form of integration with standard oracle startup/shutdown scripts for a dataguar configuration?
Or this is targeted by the broker perhaps?
For example putting Y inside /etc/oratab but also with other flags inside it or any other files around?
Or something like this:
- make a startup mount
- select switchover_status from v$database
in case output is "TO PRIMARY"
alter database recover....
otherwise if it is "TO STANDBY"
alter database open
or somethjngi similar... -
Shell Script for Startup and Shutdown the database
Hi,
i want Shell Script for Startup and Shutdown the database in Solaries.
could any one can hep me where i can get this script. or send to me to [email protected]
Thanks & Regards,
Gangi reddySHUTDOWN
SHUTDOWN ABORT]
Shuts down a currently running Oracle instance, optionally closing and dismounting a database.
Terms
Refer to the following list for a description of each term or clause:
ABORT
Proceeds with the fastest possible shutdown of the database without waiting for calls to complete or users to disconnect.
Uncommitted transactions are not rolled back. Client SQL statements currently being processed are terminated. All users currently connected to the database are implicitly disconnected and the next database startup will require instance recovery.
You must use this option if a background process terminates abnormally.
IMMEDIATE
Does not wait for current calls to complete or users to disconnect from the database.
Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
NORMAL
NORMAL is the default option which waits for users to disconnect from the database.
Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
TRANSACTIONAL [LOCAL]
Performs a planned shutdown of an instance while allowing active transactions to complete first. It prevents clients from losing work without requiring all users to log off.
No client can start a new transaction on this instance. Attempting to start a new transaction results in disconnection. After completion of all transactions, any client still connected to the instance is disconnected. Now the instance shuts down just as it would if a SHUTDOWN IMMEDIATE statement was submitted. The next startup of the database will not require any instance recovery procedures.
The LOCAL mode specifies a transactional shutdown on the local instance only, so that it only waits on local transactions to complete, not all transactions. This is useful, for example, for scheduled outage maintenance.
Usage
SHUTDOWN with no arguments is equivalent to SHUTDOWN NORMAL.
You must be connected to a database as SYSOPER, or SYSDBA. You cannot connect via a multi-threaded server. For more information about connecting to a database, see the CONNECT command earlier in this chapter.
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1013607
Joel Pérez -
Startup and shutdown procedure of OBIEE in linux
I'm new to OBIEE. Can you please tell me the procedure of startup and shutdown procedure of OBIEE services?
After starting the OBIEE services, what are the checklist I've to go through to make sure that OBIEE is up and running
Thanks
Edited by: 998932 on May 20, 2013 6:24 AMYou can follow the steps mentioned at http://lamont-consulting.com/index.php/blog/obiee/11g/117-stop-and-start-obiee-11g-linux.
Pls mark correct or helpful. -
Need to make automatic startup and shut down for the instance
hi to all
i have os : Red Hat lunix as 3 , woth oracle DB 10g 10.0.1
need to make an automatic startup and shut down for the instance when i start and shutdown the OS
i tried Use dbstart and dbshut scripts then created file dbora at dbora as a script
then i did
# ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/K01dbora
# ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora
# ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/K01dbora
# ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora
nothing worked
if you will attach me any files
my mail is :
[email protected]
thanks much
AhmedHi,
The /etc/oratab should have an entry for this database with 'Y' in the last field as:
Oracle_sid: Oracle_Home:Y, so when dbstart command issued it will check the oratab and starts the database.
I advise you to keep the dbstart and dbshut in different scripts and save them directly in the runlevel directories, instead of creating links.
thanks
srinivas. -
Using launchd to send an email on startup and shutdown
Hello All !
I'd like to get an email whenever my Mac starts up and shuts down, since I have to leave it unattended for quite some long periods of time (and even with the help of a UPS, power goes out anyway...). My Mac runs under Mac OS X Lion.
I found some help on the Internet, mainly from this page : http://www.syntaxtechnology.com/2009/06/email-on-shutdown-and-restart/ , which applies to Linux, and hoped it could work on Mac OS X (I thought at first I could just drop a script in something like /etc/init.d/ or /etc/rc.d/rc5.d but well... we have launchd instead...).
The first method listed in the page above worked well, but sends an email only on startup (for a reminder: you add a line that starts with @reboot in your crontab, and a command that sends directly an email).
I then tried to adapt the second method to Mac OS X, and succeeded partially: I wrote a small script based on what was shown on that page (a start and stop function, start gets called when the script is started, and stop gets called based on a trap on various kill signals, with an infinite wait loop: see below). I also wrote the plist file, loaded it in launchd and rebooted my Mac several times to test everything.
I get an email on each startup (yeah!), but the shutdown mail gets sent only at the next startup. So I guess that postfix gets killed by the shutdown process *before* being able to send my shutdown email :-(
So here are my main questions, if someone can help me:
1. is there a way to precisely call a script during the shutdown process, meaning giving it a priority so it gets called before postfix dies ? (like the rc directories and the naming conventions (KnnScriptName and SnnScriptName) found on some Linux/Unix).
2. is it possible to do that with launchd ? if not, what would be the Mac OS X sanctionned way of doing this ?
Other things:
3. my shell script writing ability is kind of rusty, so maybe I made some "very bad shell writingTM": l'm not sure putting an infinite while loop with a 15 second pause in it is the best way of telling a script to do nothing. There might other things in there that would make an Unix guru jump out of his chair: please tell me :-)
This is my plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=“1.0”>
<dict>
<key>Disabled</key>
<false/>
<key>Label</key><string>org.amarante.startshutemail</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Scripts/startshutemail-launchd.sh</string>
<string>start</string>
</array>
<key>RunAtLoad</key><true/>
</dict>
</plist>
And this is the script that does the job:
#!/bin/bash
# PHL 20120604 startshutemail-launchd.sh
# Send an email on startup and shutdown (version for launchd)
# Based on script and explanations found here:
# http://www.syntaxtechnology.com/2009/06/email-on-shutdown-and-restart/
# Modification history
# PHL 20120604 v01 First version
# Environment variables #################################################
DEST_EMAIL="[email protected]"
SRV_NAME=Amarante
EVENT_TIME=$(date +%Y/%m/%d-%H:%M:%S)
RESTART_SUBJECT="[$SRV_NAME] $EVENT_TIME : System Startup"
RESTART_BODY="This is an automated message to notify you that $SRV_NAME started successfully at $EVENT_TIME."
SHUTDOWN_SUBJECT="[$SRV_NAME] $EVENT_TIME : System Shutdown"
SHUTDOWN_BODY="This is an automated message to notify you that $SRV_NAME is shutting down now ($EVENT_TIME)."
# Functions ##########
stop()
echo "$SHUTDOWN_BODY" | mail -s "$SHUTDOWN_SUBJECT" $DEST_EMAIL
return 0
start()
echo "$RESTART_BODY" | mail -s "$RESTART_SUBJECT" $DEST_EMAIL
return 0
# Main part #########
case $1 in
stop)
stop
start)
start
esac
# trap kill signals to send an email
trap stop HUP INT QUIT ABRT KILL ALRM TERM TSTP
# sleep until killed
while :
do
sleep 15
done
Thanks for your help, and any comment :-)
Paul-HenriThanks a lot for your answer, Camelot, even if it sorts of confirm what I suspected. Pinging a machine from an external observer is a solution, but it will also report broken links problems and not only a computer shutting down, and it raises the next tier of problems, general network reliability after individual system reliability. It's something I'll have to look at for sure.
It's weird there isn't any way to access the way the shutdown process works.
One of the commenters (#14) on the page from Syntaxtechnology had a similar problem: he added a "sendmail -q" in his script to force sendmail to go to work and service the queue before shutting down, which I can try, but he also added a delay to the stop process of sendmail, which is something I'm not sure I can do on Mac OS X (and that might disappear one day with one of the OS updates).
Unless there is a way to change the launchd.plist file for postfix and add an ExitTimeOut option in it (I found this idea here : https://discussions.apple.com/message/17229690#17229690 )
Cheers,
Paul-Henri -
11g1 automatic startup under Fedora 9 Linux quit working
11g1 automatic startup under Fedora 9 Linux worked for months
Now I have to start 11g1 manually!
since then I've been doing regular yum updates to a number of new kernels
currently :
LMKIII (root) /var/log [600|http://forums.oracle.com/forums/]>uname -a
Linux LMKIII 2.6.27.19-78.2.30.fc9.i686 #1 SMP Tue Feb 24 20:09:23 EST 2009 i686 i686 i386 GNU/Linux
on boot page, the usual command that starts 11g1 just zips on by
I've looked in the boot messages to no avail. Still looking.
Has to be a kernel change because I've lect 11g1 alone for monthsI did a www.ask.com for "dbstart pam.d" and got the answer.
pam.d and SELINUX are very complex.
I am still wary of lurking problems!
Apr 16 18:43:57 LMKIII sshd[2176]: Server listening on 0.0.0.0 port 22.
Apr 16 18:44:10 LMKIII rshd[2473]: PAM unable to dlopen(/lib/security/pam_rhosts_auth.so): /lib/security/pam_rhosts_auth.so: cannot open shared object file: No such file or directory
Apr 16 18:44:10 LMKIII rshd[2473]: PAM adding faulty module: /lib/security/pam_rhosts_auth.so
Apr 16 18:44:11 LMKIII rshd[2473]: pam_rhosts(rsh:auth): denied access to [email protected] as oracle
Apr 16 18:44:11 LMKIII rshd[2473]: pam_unix(rsh:session): session opened for user oracle by (uid=0)
Apr 16 18:45:11 LMKIII rshd[2473]: pam_unix(rsh:session): session closed for user oracle
Apr 16 18:49:07 LMKIII kdm: :0[2881]: pam_unix(kdm:session): session opened for user oracle by (uid=0)
Apr 16 18:50:41 LMKIII su: pam_unix(su-l:session): session opened for user root by oracle(uid=503)
Apr 16 18:54:46 LMKIII su: pam_unix(su-l:session): session closed for user root
Apr 16 18:54:49 LMKIII kdm: :0[2881]: pam_unix(kdm:session): session closed for user oracle
Apr 16 18:55:01 LMKIII sshd[2176]: Received signal 15; terminating.
Apr 16 18:56:55 LMKIII sshd[2171]: Server listening on 0.0.0.0 port 22.
Apr 16 18:57:08 LMKIII rshd[2473]: PAM unable to dlopen(/lib/security/pam_rhosts_auth.so): /lib/security/pam_rhosts_auth.so: cannot open shared object file: No such file or directory
Apr 16 18:57:08 LMKIII rshd[2473]: PAM adding faulty module: /lib/security/pam_rhosts_auth.so
Apr 16 18:57:09 LMKIII rshd[2473]: pam_unix(rsh:session): session opened for user oracle by (uid=0)
Apr 16 18:58:09 LMKIII rshd[2473]: pam_unix(rsh:session): session closed for user oracle
Apr 16 18:59:26 LMKIII kdm: :0[2880]: pam_unix(kdm:session): session opened for user oracle by (uid=0)
Apr 16 19:00:31 LMKIII su: pam_unix(su-l:session): session opened for user root by oracle(uid=503)
Apr 16 19:01:50 LMKIII su: pam_unix(su-l:session): session closed for user root
Apr 16 19:02:23 LMKIII su: pam_unix(su-l:session): session opened for user root by oracle(uid=503)
Apr 16 20:48:14 LMKIII sshd[4117]: Address 194.80.134.6 maps to no-reverse-defined.ja.net, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Apr 16 20:48:14 LMKIII sshd[4117]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=194.80.134.6 user=root
Apr 16 20:48:16 LMKIII sshd[4117]: Failed password for root from 194.80.134.6 port 51090 ssh2
Apr 16 20:48:16 LMKIII sshd[4120]: Connection closed by 194.80.134.6
Apr 16 21:11:12 LMKIII sshd[4287]: Address 194.80.134.6 maps to no-reverse-defined.ja.net, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Apr 16 21:11:12 LMKIII sshd[4287]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=194.80.134.6 user=root
Apr 16 21:11:14 LMKIII sshd[4287]: Failed password for root from 194.80.134.6 port 53791 ssh2
Apr 16 21:11:15 LMKIII sshd[4290]: Connection closed by 194.80.134.6
Apr 16 21:28:54 LMKIII sshd[4383]: Address 194.80.134.6 maps to no-reverse-defined.ja.net, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Apr 16 21:28:54 LMKIII sshd[4383]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=194.80.134.6 user=root
Apr 16 21:28:55 LMKIII sshd[4383]: Failed password for root from 194.80.134.6 port 44904 ssh2
Apr 16 21:28:56 LMKIII sshd[4386]: Connection closed by 194.80.134.6
Apr 16 21:46:47 LMKIII sshd[4481]: Address 194.80.134.6 maps to no-reverse-defined.ja.net, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Apr 16 21:46:48 LMKIII sshd[4481]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=194.80.134.6 user=root
Apr 16 21:46:50 LMKIII sshd[4481]: Failed password for root from 194.80.134.6 port 36020 ssh2
Apr 16 21:46:50 LMKIII sshd[4484]: Connection closed by 194.80.134.6 -
Startup and shutdown of 11i Services in windows
Hi friends, I am new for windows.
how can we startup and shutdown of 11i instacne under windows.
can we do it through services screen
or
can we do it through scripts as we do it on Unix/Linux
which is the best methodEither way is fine. Use the method which you feel if more comfortable to you. But I would suggest keep using scripts, as in future if you move to other platform you will not get surprised.
Thanks
Sundeep
http://troubleshootingappsdba.blogspot.com -
Startup and shutdown from command line with version 9i
Hi, i'm an Oracle newbie. I heard it's possible to startup and shutdown an oracle (instance? or database? which one is it) from the command line.
A little background on what it is that I want to do:
I'm looking to backup a database by copying the files that make up the database to a location from where they will be commited to tape media. To do this I must shutdown the database, copy the files, and startup the database again.
At the moment the backups are full exports which I find unnecessary since it is a development database which is never used at night. It is therefore not an issue if we want to shut it down and re-start it after a few minutes. (I think it would take longer to export as opposed to copy the files right?)
I need help and advice :
1. Is my way of going about this correct ?
2. How do I startup/shutdown from the command line (sqlplus user/password command) or should I use another utility ?
Thanks,
Gabrielset oracle_sid=ORCL ==> your database namethis is NOT always true. It's instance name. usually, we set instance name is same as database name.But we also can set instance name is different from database name.
for example.
C:\>oradim -new -sid abc123
C:\>set ORACLE_SID=abc123
C:\>sqlplus /nolog
SQL*Plus: Release 9.0.1.4.0 - Production on Tue Jun 20 22:40:59 2006
(c) Copyright 2001 Oracle Corporation. All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup pfile=E:\ora901DB\admin\init.ora
ORACLE instance started.
Total System Global Area 344748244 bytes
Fixed Size 282836 bytes
Variable Size 184549376 bytes
Database Buffers 159383552 bytes
Redo Buffers 532480 bytes
Database mounted.
Database opened.
SQL> select name from v$database;
NAME
DB901
SQL> select instance_name from v$instance;
INSTANCE_NAME
abc123 -
Startup and shutdown sequence in MSCS clustered EP
Hi,
We are running an Enterprise portal in a clustered environment with 2 nodes (HA). Please advice the best practice
on startup and shutdown order and procedures for the instances, SCS, CI and database and cluster (nodes).
This is essential for maintenance and patching.
Thanks and regards,Hi,
Your wish you can stop using cluster manager or using script.
You should always shut your central instance lastly,enque server should be also shutdown before the central instance,as far as i know.
Regards,
Vamshi. -
How to write triggers on startup and shutdown of the server?
Plz advice.
How to write triggers on startup and shutdown of the server?
I could write it but nothing happened!!!Small code example for you:
[email protected]> @ connect mob/mob
[email protected]> create or replace trigger shutdown_trigger
2 before shutdown on database
3 begin
4 insert into shut_table values(sysdate);
5 end;
6 /
Trigger created.
[email protected]> create or replace trigger start_trigger
2 after startup on database
3 begin
4 insert into start_table values(sysdate);
5 end;
6 /
Trigger created.
[email protected]> @ connect "/ as sysdba"
[email protected]> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
[email protected]> startup
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
Total System Global Area 64036368 bytes
Fixed Size 454160 bytes
Variable Size 50331648 bytes
Database Buffers 12582912 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
[email protected]> select * from mob.start_table;
START_DAT
14-SEP-06
[email protected]> select * from mob.shut_table;
SHUT_DATE
14-SEP-06
Best Regards
Krystian Zieja / mob -
10.6.1 Slow Startup and Shutdown
Did anyone notice the difference between the 10.6.1 startup and shutdown times and the 10.6 times ?
I had to do a clean install of 10.6 and ignore the 10.6.1 update to get back speed in startup and shutdown.
Is there anyway to solve this.
Thanks.I had the same problems, and I figured out the cause. It seems that somehow the ownership of my root directory (/) wasn't assigned to the root account anymore, but to myself instead. This made the kernel prelinking fail since it requires that root is the owner. This is how you solve this after launching the Terminal app:
{quote:title=terminal commands}sudo chown root:admin /
sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches{quote}
You'll have to enter your password after the first command.
Hope this helps someone, since it was really frustrating to have these slower startup/shutdown times for me. -
Spontaneous startups and shutdowns
Ever since I got my G5 in 2004, I've had spontaneous startup/shutdown problems. I will wake up in the morning or come home from work and find the computer on and at the login prompt (I have set no such predetermined startup time.) Or, I'll be working and all of a sudden it powers down and then powers back up (it will bring me back to the same screen and what I was doing), but after repeated occurrences of shutdown/startup, usually in short succession, it will permanently shut down, requiring me to shut off the battery backup into which it is plugged to reset the whole system. Then things settle down for a while. Then a month or two later, it will go through another bad spate of spontaneous startups and shutdowns, almost like it just got over a cold only to contract a new one.
At first, Apple said it was a motherboard problem which they replaced; that didn't solve my problem. Then they said it was a bad video cable to the monitor and repaired that; that didn't solve my problem, either. They asked if I had any peripherals (printer, scanner, external HD) hooked up and said such items can cause erratic behavior (to which I felt like asking "then why do you manufacture your computers with ports in them so users CAN plug in other devices?") I've given up taking it to them because I can't make it replicate its erratic behavior and unless they see what it's doing, they can't do anything about it (and I don't think they really believe me, anyway...)
I've reset my PRAM. I've reset my SMU (actually that happens every time I shut down the computer because I shut down the battery backup every time to prevent unsupervised morning startup.) I've run Disk Warrior. I've checked and confirmed my power source. I've literally unplugged everything (and I mean EVERYTHING) and re-connected all components. All to no avail. I even have video of it happening because Apple doesn't believe what I'm describing. Is it possible that my computer has been infected and is one of those "slave computers" that hackers use to do their bidding? I've wondered about that...
Has anyone else experienced this?It almost sounds like a bad UPS.
Have you tried bypassing the UPS? What is the rating of the thing?
Maybe you are looking for
-
Procurement Of Imported Material From Trader
hi, i am purchasing one imported material from a trader,in this case excise treatment is different *MATERIAL QUANTITY RATE/UNIT RATE OF DUTY/UNIT EX-DUTY&CESS* AMOUNT
-
How to display all the rows in a report
How will it be possible to show all the rows in a report, in a table view , other than modifying the table properties for each report individually ? Is there some setting, so that for all tabular reports, all the rows will be displayed in one page? I
-
Using navigation attributes in planning queries
Hi all! In one of the SAP demos I saw something like: we've got a "Store" char in planning query, and Region, Format and Climate added as free characteristics. Region, Format and Climate are navigation attributes of the Store characteristic. And when
-
Contact View "Online" doesn't show non-skype users
After the latest update/patch whatever, the "Online" Contacts view no longer shows contacts that aren't using skype, even if they are online. I now have to use the "All" contact view to see some of the people who are online but using messenger, even
-
Table for the recorded result.Result automatically calculated using formula
Hi experts, I want to know where this results will be saved(table name) when we use formula in inspection plan.I have marked char.calc in control indicator and formula has been entered in inspection plan.While entering the result when i cli