automatically start oracle...?
Hi all,
I installed oracle 11 GR 2 successfully in redhat 6.4 on my pc. After that, I want to
do auto-start when pc starts. I used the follwing script: -.
#! / bin/bash
#
# oracledb - little shell script for autostart your databases oracle and Auditor
#
# chkconfig: 2345 90 90
# Source function library.
. /etc/init.d/functions
# Source network configuration.
. sysconfig
PROG = oracledb
LOCKFILE = / var/lock/subsys / $prog
ORACLE_HOME=/opt/Oracle/app/Oracle/product/11.2.0/dbhome_1
ORACLE_USER = oracle
Start() {}
["$NETWORKING" = "no"] & & exit 1
If [f $LOCKFILE]; then
echo $0 already running.
Output 1
FI
echo - n $"Starting oracle database."
known - $ORACLE_USER - c "start ORACLE_HOME/bin/lsnrctl $".
Su - $ORACLE_USER-c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME.
known - $ORACLE_USER - c "$ORACLE_HOME/bin/emctl start dbconsole.
RETVAL = $?
ECHO
[$RETVAL - eq 0] & & touch $LOCKFILE
return $RETVAL
}
Stop() {}
If [! f $LOCKFILE]; then
echo $0 already stopped
Output 1
FI
echo - n $"Stoping oracle database."
known - $ORACLE_USER - c "judgment of $ORACLE_HOME/bin/lsnrctl.
Su - $ORACLE_USER-c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME.
known - $ORACLE_USER - c "$ORACLE_HOME/bin/emctl stop dbconsole.
RETVAL = $?
ECHO
[$RETVAL - eq 0] & & rm-f $LOCKFILE
return $RETVAL
}
case '$1' in
'Start')
beginning
;;
'stop')
stop
;;
"restart")
stop
beginning
;;
'status')
If [f $LOCKFILE]; then
echo $0 began.
on the other
echo $0 stopped.
FI
;;
*)
echo "use: $0 [start |]» stop | status].
Output 1
ESAC
Exit 0
I did like this: -.
# cp /etc/rc.d/init.d/oracledb oracledb
# chkconfig - add oracledb
# chkconfig oracledb on
everything is ok except
After restarting pc
404 not found
to do this: -.
$sqlplus / as sysdba
SQL > startup;
then
" https://localhost:1158 / em "works very well "
question of making the autostart oracle database and I wouldn't need to explicitly
start as sysdba
------------------------
If I manually give the orders
$lsnrctl start
successful
$dbstart $ORACLE_HOME
and
$dbshut $ORACLE_HOME
immediately after the gift of command, it shows no output. How will I know whether it is successful or not.
and finally
$emctl start dbconsole
works very well (no error)
what I would do.
Thanks in advance.
A manual start with dbstart work? Have you checked your file/etc/oratab to see if entries for ORACLE_SID: ORACLE_HOME: Y?
If you do not have oratab, just run root.sh as user root
replace chkconfig with---> chkconfig: 35 99 10
chmod 755 /etc/init.d/dbora
Register the Service with
/ sbin/chkconfig--add released
Kind regards
Suntrupth
Tags: Database
Similar Questions
-
How to automatically start Oracle on SUSE Linux
I have Oracle 11g installed on a server running SUSE Linux 11. I followed the official Oracle instructions to try to implement the Oracle for an automatic start.
My/etc/oratab file contains the following:
sidname:/opt/oracle/product/11gR2/db:Y
I created a /etc/init.d/dbora file that contains the following:
#! /bin/sh -x # # Change the value of ORACLE_HOME to specify the correct Oracle home # directory for your installation. ORACLE_HOME=/opt/oracle/product/11gR2/db # # 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 if [ "$PLATFORM" = "Linux" ] ; then touch /var/lock/subsys/dbora fi 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
So I ran the following commands:
chgrp dba /etc/init.d/dbora 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/rc5.d/S99dbora shutdown -r now
After the reboot, Oracle did not work:
server:~ # ps -fea | grep ora root 2681 2563 0 21:18 ? 00:00:00 hald-addon-storage: no polling on /dev/fd0 because it is explicitly disabled root 2688 2563 0 21:18 ? 00:00:00 hald-addon-storage: polling /dev/sr0 (every 2 sec) root 4491 4333 0 21:19 pts/1 00:00:00 grep ora server:~ # ps -fea | grep lsnr root 4493 4333 0 21:19 pts/1 00:00:00 grep lsnr
Oracle works very well after the start of the instance (by logging in as "sys as sysdba" sqlplus and the command 'boot') and the listener. But it will not start automatically after the server is restarted. Why is this?
I got it to work. I had to change the file released to look like this:
#! /bin/sh -x # # Change the value of ORACLE_HOME to specify the correct Oracle home # directory for your installation. ORACLE_HOME=/opt/oracle/product/11gR2/db # # Change the value of ORACLE to the login name of the # oracle owner at your site. # ORACLE=oracle PATH=${PATH}:$ORACLE_HOME/bin export ORACLE_HOME PATH touch /var/lock/subsys/dbora case $1 in 'start') su - $ORACLE $ORACLE_HOME/bin/dbstart $ORACLE_HOME & ;; 'stop') su - $ORACLE $ORACLE_HOME/bin/dbshut $ORACLE_HOME & ;; *) echo "usage: $0 {start|stop}" exit ;; esac # exit
Then I had to delete the files auto_listener.sh and startup.log in $ORACLE_HOME because they were incorrectly owned by root.
-
How to start Oracle HTTP server automatically during the startup of the server?
I installed the software of Oracle 11 g (fusion).
I use only the Oracle HTTP component in any merger software for my Apex 4.0 to work.
Now to start the Oracle HTTP server is a command:
opmnctl startall
(1) I wanted my Oracle HTTP server starts automatically each time my server reboots (Windows 2008 R2).
How do I do that? Is there a place in Windows (autoexec) or somewhere I can copy the above command
If the operating system runs this command every time when the server is restarted, instead of me manually
execution of the command.
Thanks in advance.I have a Linux script that does this. Maybe you can convert:
#! / bin/bash
###############################################################################
# Description: Script starting and stopping iAS and reboot after shutdown #.
# File: iasora #.
################################################################################ Global Variables - change as needed.
#
#
IAS_FILE = "/ u01/app/oracle/product/midtier/bin/emctl." PID.
RETRIES = 3# Set the script excution environment
. / Home/Oracle/ias10g_midtier. Profile
# Determine and perform actions based on the command line parameter
case '$1' in
implementation)
LOOP_COUNTER = 1
up to [f $IAS_FILE]
do
echo 'date '.
"ECHO"
echo "Starting Oracle iAS components."sleep 2
Su - oracle-c ' $ORACLE_HOME/opmn/bin/opmnctl startall verbose; output.
echo "Starting Oracle iAS Server Control Application"
sleep 2
Su - oracle - c "$ORACLE_HOME/bin/emctl start iasconsole '.
If [! f $IAS_FILE]
then
If ['$LOOP_COUNTER"- eq"$RETRIES"]
then
echo "I give up. The file does not exist on the server.
Echo "or something else failed."
ECHO «»
# At this point we could not download the file, send an alert...
mailx-s 'cannot restart iAS' [email protected]<>on the other
echo "the next restart attempt will be in 15 seconds... Please wait. »
LOOP_COUNTER = ' expr $LOOP_COUNTER + 1' # increment the counter.
sleep 15FI
FIfact
touch/var/lock/subsys/iasora
sleep 30
ECHO «»
ECHO «»;;
*)
-
Avoiding the oracle to automatically start each time you start
1.
I installed Oracle 11 GR 2 on my laptop and put back command (update - rc.d oracledb default 99) to oracle to automatically start each time you start.
Now, I do not want that, I want to start oracle oracle when necessary, now what I should do.
2.
I have different users on this laptop, can I have SQL prompt while loged in the other then oracle.
I will be very thank full.You can use,
update - rc.d oracledb disable
See here,
http://kuriqoo.blogspot.com/2010/07/preventing-services-to-startup-at-boot.htmlThank you
-
How to start Oracle service automatically?
Hello
I use Linux server with Oracle10g. Often my server is restarted, in this scenario, I want to restart all the databases andllistener. Please inform me how automatically start Services/instances Oracle while rebooting the server?
Thank you
GoussardYou must create the new service which will start and stop databases and listeners when the server is restarted.
Linux new services are created under /etc/init.d - and then it should start/stop script for oracle having created new service must be added and run levels are configured.You can start by reading this link:
http://www.Linux.com/articles/46892In order to understand the overall process.
-
schedule the automatic start of oracle 10g R2 on RHEL5
Hi master,
I use oracle 10g R2 on RHEL 5. I want to program the automatic start of the oracle on linux start database.
for that I have referefed the docs and plan its in the file/etc/rc3.d. but it does not work.
It is written in the docs that this charger friub fron of process this file and start their beds according to their number.
the file is as follows...
#! / bin/sh
#chkconfig: 346 99 10
Description #: Oracle automatic start-stop script.
#
# Change the value of ORACLE_HOME to specify the right Oracle home
# To your installation directory.
ORACLE_HOME=/U01/app/Oracle/product/10.2.0/Db_1
#
# Change the value of the ORACLE of the connection of the
owner of oracle # on 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.
output
on the other
rsh $HOST-l $ORACLE $0 $ 1 ORA_DB
output
FI
FI
#
case $1 in
'Start')
$ORACLE_HOME/bin/dbstart $ORACLE_HOME
;;
'stop')
$ORACLE_HOME/bin/dbshut $ORACLE_HOME
;;
*)
echo "use: $0 {start |}". stop}.
output
;;
ESAC
#
output
What should I look for?
my listening service is also not automatically get started. I have to manually...
any suggestion?
Thanks and greetings
VD
Published by: vikrant dixit on December 23, 2008 21:58VD,
This link willl helpp
http://www.Oracle-base.com/articles/Linux/AutomatingDatabaseStartupAndShutdownOnLinux.php
HTH
Aman... -
Automatic start of the database, authentication at the start of the OS failure
Hello world
We have installed the oracle 11g on OEL 6.4 database, and we tried to start follow these automaticlly this source
http://docs.Oracle.com/CD/B28359_01/server.111/b32009/strt_stp.htm#UNXAR172
but instead to use rsh, we try to use ssh to do we create public keys and test our script from root and starting databases successfully. But when we reboot OS it sends this:
Permission denied (publickey, gssapi-keyex, gssapi-with-mic)
Kind regards
René.
A: one of the approaches is to use dbstart and dbshut by init.d scripts
Another way is to create your own script. To do this, create your own 'freed' in the directory /etc/init.d/ script
# touch /etc/init.d/dbora
-------------------------------------------------------------------------------------
#! / bin/sh
# chkconfig: 345 99 10
Description #: Oracle automatic start-stop script.
# Applies to the Orcle/10 / 11g
#
# Set ORA_HOME
# Set ORA_OWNER
ORA_HOME=/DBServer/app/Oracle/product/11.2.0/dbhome_1
ORA_OWNER = oracle
If [! f $ORA_HOME/bin/dbstart]
then
echo "" Oracle startup: error $ORA_HOME/bin/dbstart does not exist, cannot start ".
output
FI
case '$1' in
'Start')
# Run Oracle databases:
# The following command assumes that the oracle connection
# will not prompt the user for all values
Su - $ORA_OWNER-c "$ORA_HOME/bin/dbstart $ORA_HOME.
touch/var/lock/subsys/Ben
;;
'stop')
# Stop the Oracle databases:
Su - $ORA_OWNER-c "$ORA_HOME/bin/dbshut $ORA_HOME.
RM-f/var/lock/subsys/Ben
;;
ESAC
----------------------------------------------------------------------------------------------------------------
#Edit the file "/ etc/oratab" and put the flag of the desired instance started to 'Y '.
#MYDB1:/u01/app/oracle/product/10.2.0:Y
#Add released in init.d
[#[root@host ~] # chkconfig--add released
#Set the right permissions
750 /etc/init.d/dbora #chmod
[root@dba ~] # service released stop
log file /dbserver/app/oracle/product/11.2.0/dbhome_1/shutdown.log
[root@dba ~] # start service released
log file /dbserver/app/oracle/product/11.2.0/dbhome_1/startup.log
-
Hello
I am trying to install the Oracle 11.2.0.1 on Oracle Linux 7.0 database 64-bit deployed on VirtualBox. I'll put up a single on making ASM instance database so the grid on a stand-alone server installation. I launched the installer of grid with YES. When I run the script from root
/U01/app/grid/product/11.2.0/grid/root.sh
I get the following error:
Default: no such file or directory for the command/sbin/initctl start oracle-ohasd
Failed to start oracle-ohasd, error: Inappropriate ioctl for device
ohasd could not start: ioctl inappropriate for this device, /u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl line 296
After installing Oracle Linux 7.0 there is no/etc/init and also no/sbin/initctl created automatically under Linux. I don't know if these directories need to be created automatically or not?
I googled this problem. Most of the solutions is like this:
""""""""""""""""""""""""""""""""""""""""""""""
Hello
Problem is indeed due to the incompatibility of the upstart/init. Here are the average working:
1) proceed with the installation as usual until root.sh invocation.
(2) prior to root.sh edition $GRID_HOME/crs/install/s_crsconfig_lib.pm, go to line 1173 (you should find a code like: if ($srv eq 'ohasd') {# OHASD Start).
(3) insert a following code snippet before starting the game OHASD (line 1173)
My $UPSTART_OHASD_SERVICE = 'oracle-ohasd. "
My $INITCTL = "/ sbin/initctl;
($status, @output) = system_cmd_capture ("$INITCTL start $UPSTART_OHASD_SERVICE");
If (0! = $status)
{
error ("' cannot start $UPSTART_OHASD_SERVICE, error: $! '");
return $FAILED;
}
(4) create a file /etc/init/oracle-ohasd.conf with the following content inside
# Start OHASD oracle
start the runlevel [35]
Stop the runlevel [. 35]
respawn
exec /etc/init.d/init.ohasd run > / dev/null 2 > & 1 </dev/null
(5) call root.sh
(6) complete the installation.
If you have already run root.sh (unsuccessfully), simply roll back:
$GRID_HOME/crs/install/roothas.pl - deconfig - force - verbose
Make changes above and continue.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
The part above is not the solution!
How to solve the problem?
Thank you!!!
11.2.0.1 is not supported on RHEL7, even on RHEL6, you must install at least 11.2.0.3.
You can see the matrix certification Oracle Support for Linux look at this document: master Note Linux OS requirements for database server (Doc ID 851598.1)
Kind regards
Oscar
-
Problem to start Oracle 10 G Enterprise Linux
Hi guys! Please I need help.
Recentlly I installed Oracle 10 g on Linux Enterprise 5.4, the finished good, instalation I loged in isqlplusselect a few example of table, but then when I reboot to start computer oracle can't, I changed/var/opt/oracle/oratab the opsion 'Y' in oracle sid: oracle home.
When I manually start isqlplus and try to connect, I get this error "ERROR ORA 12541: TNS: no listner, I tried to start id form/oracle/bin, but I gess, it's not working."
Can someone help me with this, I mean how can I start to oracle, and what I need to chang for automatic start
Thank youOK, here's what you need to do to 10.2.0.1 (I guess that's what you mean by 10 gr 2):
1. open the dbstart script located in /home/oracle/product/10.2.0/db_1/bin
2. search for all occurrences of the string "/ ade/vikrkuma_new/oracle" and replace it with "$ORACLE_HOME". This is a known bug fix.
3. edit/etc/oratab and set option to Y for the database that you want to start automatically.
4. create a file /etc/init.d/dbora as root with the following content (defining the correct values for ORA_HOME and ORA_OWNER):
#!/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=+path_to_your_oracle_installation+ ORA_OWNER=+your_database_sid+ 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 ;; '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 ;; esac
5 set permissions for the new file (replace "dba" with defined during the installation of Oracle dba OS group):
# chgrp s/n /etc/init.d/dbora
# chmod 750 /etc/init.d/dbora6. run:
# chkconfig--level 345 released on
Restart and test if the DB starts correctly.
I hope this helps.
And by the way, I'm not Russian, Bulgarian. But you were close enough ;)
-
How can I prevent all automatic starts iTunes?
Hello
Is someone can you PLEASE advise me how I can prevent ITunes turning prematurely gray? It starts with persistence without asking for confirmation. I want to be able to achieve is to prevent ITunes automatically start under ANY circumstances.
I have already completed THE steps to ignore my IPhone and IPad and Itunes isn't in any login script (as far as I can see). Something is always load up and leads me into the wall
What seems to be incited ITunes at startup was a message saying that my Session of Apple (or something like that) had expired and I had to reconnect again...
I found a solution a little backward... but I wonder if an Itunes update has restored this infuriating behavior and to make it worse, I remember not where I found the solution.
Guidance would be MUCH appreciated.
Steve
Hacks to stop Bluetooth speaker to start iTunes-
http://forums.MacRumors.com/ShowPost.php?p=19045335 & postcount = 4
LincDavis August 2015 post - https://discussions.apple.com/message/28821151#28821151
-
Bluetooth does not automatically start after start
Hello
I have a SONY VAIO with built in Toshiba Bluetooth. My bluetooth in the taskbar icon no longer appears when Windows starts. That's happened? I always start the Bluetooth manually in Control Panel... Help, please. How can I activate Bluetooth on starting again? Thank you very much.
I don't know how it works on Sony laptop computers, but on my Toshiba BT application automatically starts when the BT module is enabled. In any case, try to define as suggested by the creation of shortcuts.
-
... When I plug Apple EarPods, helmet or an audio jack in my car, iBooks automatically starts an audiobook... it happens all the time when I want to just listen to a song or answer the phone! How to stop?
Help please - thx!
I have this problem as well on an iPhone 6. I went to Audible for listening to audio books, but iBooks keeps opening and automatic reading a book that I wasn't even listening when I plug in my headphones. Sometimes there is a delay, then I will listen to something on Audible for a few seconds, and then it stops and be interrupted by iBooks from. It is really unpleasant.
I really don't want anything to play automatically when I plug my headphones.
-
Application will automatically start
I have a PC that runs an application automatically at startup and stops at Windows and the PC when you exit the application. I checked the boot menu (one profile) and a few keys in the registry but found nothing. Always the application automatically starts when it is started in Mode safe. If not, where can I get?
Looks like you need to run the free software "Autoruns". It shows practically everything that runs at startup and gives you the ability to disable one of them.
Autoruns: <> http://technet.microsoft.com/en-us/sysinternals/bb963902 >
HTH,
JW -
My usb ports and cd/dvd player will not automatically start when something is plugged on them have to start manually.
Hello
· Do you remember all the recent changes on the computer before the show?
· What is the service pack installed?
Follow method 2 in the link below and check if AutoPlay is enabled, a link: AutoRun feature or the AutoPlay feature does not work when you insert a CD-ROM into the CD drive: http://support.microsoft.com/kb/330135
I suggest to fix the AutoPlay parameter by downloading the file below and check the results: AutoPlay Repair Wizard: http://www.microsoft.com/downloads/en/details.aspx?familyid=C680A7B6-E8FA-45C4-A171-1B389CFACDAD&displaylang=en
-
computer automatically starts in safe mode without prompting, a problem with your computer can prevent Windows to start normally
Do you know when this problem started? Try a system restore to a point in time BEFORE the problem started. Here is the procedure: http://www.howtogeek.com/howto/windows-vista/using-windows-vista-system-restore/. Don't forget to check the box to show more than 5 days of restore points. If the first attempt fails, then try an earlier point or two. NOTE: You will need to re - install any software and updates that you have installed between now and the restore point, but you can use Windows Update for updates.
If the system restore does not work, do a startup repair, boot from the disk Installation of Windows Vista genuine (or one that you can borrow from someone) or a recovery disc. Here is the procedure: http://www.bleepingcomputer.com/tutorials/tutorial148.html. You may need to change the BIOS to do first the CD drive in the boot sequence to boot from the CD. To do this, hold the screen that tells you the key F to push to enter the menu start or start of installation. Push it quickly. Make the changes, save your work and exit. Put the CD in the drive and reboot. When you are prompted, press any key to boot from the CD.
If you do not have a floppy disk, you can make a bootable recovery disk by using http://neosmart.net/blog/2008/windows-vista-recovery-disc-download/ with burning software like: http://www.snapfiles.com/get/active-isoburner.html and, of course, a blank CD.
Good luck and I hope this helps. Lorien - a - MCSE/MCSA/network + / A +.
Maybe you are looking for
-
WHEN I OPENED MORE THAN 2 TABS WATCHING YOUTUBE OR VIDEO SITES, A SCREEN BLUE WILL SHOW SAYING THAT PHYSICAL MEMORY DUMP... STOP STOP 0X0000008E (0XC0000005, 0XBF05D7EE, 0XECE00BC0, 0X00000000)
-
The Sims 3 create a world tool beta crash
I tried to install the sims 3 create a world tool beta, and whenever I try to open it, it displays error messages indicating that the data didn't were not founnd, the site crashed and I had to close the windows Task Manager. Then, it closes by itself
-
Install Windows 7 on a disk and games/programs and on another?
Thus,. My PC fried just the other day and I'm rebuilding. I have 2 HD for my new build, an SSD (40 GB) and mechanics (1 to). Can I install Win 7 64 bit on the SSD and then install all of my games and other programs on the mechanical drive and there w
-
Issue of update of blackBerry Smartphones
I just got the icon of upgrade wireless on my blackberry storm 9530. My questions are: Should I upgrade? It will do this automatically if I'm not? What are the advantages/disadvantages? I got my blackberry a few months ago, and finally he understood
-
effect of substitution of opacity stopped working
HelloWe used several rollover of opacity effects in a whole new site. Yesterday, after 3 days of work (ongoing) on the Web site, all the effects of overview of the opacity on a screen / page stopped working. We have tried to create new ones, but they