Home » Infrastructure » Unix » Using Script to startup database (merged 2) oracle 8i , Unixware 7.1
Using Script to startup database (merged 2) oracle 8i , Unixware 7.1 [message #416940] Wed, 05 August 2009 04:48 Go to next message
samirorafaq
Messages: 10
Registered: August 2009
Location: INDIA
Junior Member
Hi
I am new to oracle.

i want to start/stop the oracle using a menu based script.

can any body help me.
(OS: Unixware 7 & Database: Oracle 8i)

if ny other information is reuired for that..please tell me the same.


Thanks
SAM
Re: Using Script to startup database [message #416943 is a reply to message #416940] Wed, 05 August 2009 05:08 Go to previous messageGo to next message
Kamran Agayev
Messages: 145
Registered: February 2009
Location: Azerbaijan, Baku
Senior Member

I can share a script which is written for 10g. Didn't test it on 7 or 8i Smile

http://kamranagayev.wordpress.com/2008/12/22/automatically-startup-and-shutdown-database-in-linux-os/
Re: Using Script to startup database [message #416944 is a reply to message #416940] Wed, 05 August 2009 05:28 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10630
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>using a menu based script
A GUI pull down menu
or
Just a text mode menu from a simple shell script?
Complexity depends on where and how you want to do it.
write a simple Tcl/Tk for gui.
In any case, it does not make anything much useful / better because OEM tools will do this without any effort.



[Updated on: Wed, 05 August 2009 05:30]

Report message to a moderator

Re: Using Script to startup database [message #416953 is a reply to message #416944] Wed, 05 August 2009 06:29 Go to previous messageGo to next message
samirorafaq
Messages: 10
Registered: August 2009
Location: INDIA
Junior Member
Just a text mode menu from a simple shell script

if ny other information is reuired for that?..if it is..please tell me the same.
Re: Using Script to startup database [message #416958 is a reply to message #416953] Wed, 05 August 2009 06:53 Go to previous messageGo to next message
Kamran Agayev
Messages: 145
Registered: February 2009
Location: Azerbaijan, Baku
Senior Member

What does "Just a text mode menu from a simple shell script" mean? Have you checked my link?
Re: Using Script to startup database [message #416959 is a reply to message #416953] Wed, 05 August 2009 06:57 Go to previous messageGo to next message
samirorafaq
Messages: 10
Registered: August 2009
Location: INDIA
Junior Member
jut like below ( A sample Menu)

****************************************************

1. Start Oracle

2. Stop Oracle



Enter Your Choise :

****************************************************
Re: Using Script to startup database [message #416984 is a reply to message #416959] Wed, 05 August 2009 09:12 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10630
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Do you have multiple Oracle Instances in the same machine?
Else a menu like this makes no sense.
Oracle's supplied scripts dbstart and dbshut will just do the job.
Re: Using Script to startup database [message #416996 is a reply to message #416959] Wed, 05 August 2009 10:03 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10630
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
When executed, this will show up.
Startup / Shutdown is controlled by dbstart/dbshut and oratab

my menu
1. Start Oracle
2. Stop Oracle
3. Do nothing and exit
Enter option [1 - 3]2
***********Stop Oracle****************
ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener
Usage: /u01/home/bin/dbshut ORACLE_HOME
Processing Database instance "chum": log file /u01/home/shutdown.log

This is simple script.
Improvise it and make it any fancier you want.
oracle@vault1#cat myMenu
while :
do
 clear
 echo " my menu"
 echo "1. Start Oracle"
 echo "2. Stop Oracle"
 echo "3. Do nothing and exit"
 echo -n "Enter option [1 - 3]"
 read thisInput
 case $thisInput in
        1) echo "************Start Oracle*************";
                dbstart;;
        2) echo "***********Stop Oracle****************";
                dbshut;;
        3) echo "***********Do nothing and exit********";
                 exit 1;;
        *) echo "I am not happy with input $thisInput . Try again";
                read enterKey;;
esac
done

[Updated on: Wed, 05 August 2009 10:21]

Report message to a moderator

Re: Using Script to startup database [message #417112 is a reply to message #416996] Thu, 06 August 2009 02:32 Go to previous messageGo to next message
samirorafaq
Messages: 10
Registered: August 2009
Location: INDIA
Junior Member
THANK YOU VERY MUCH.....Mahesh.


Yor information was realy very helpful 4 me

But can u tell me how can i use "cheking".
As for eg. when oracle was already started...at time if i start the Oracle again using the menu...then it tell me that "oracle was alredy started" & vice versa

THANKS
Re: Using Script to startup database [message #417193 is a reply to message #417112] Thu, 06 August 2009 07:49 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10630
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Do a ps on the smon_yourSID before dbstart.
oracle@vault1#ps -ef | grep smon_chum | grep -v grep
  oracle 11653     1   0 08:24:02 ?           0:01 ora_smon_chum
Re: Using Script to startup database [message #417194 is a reply to message #417193] Thu, 06 August 2009 07:55 Go to previous messageGo to next message
samirorafaq
Messages: 10
Registered: August 2009
Location: INDIA
Junior Member
I m sorry Mahesh...

i m not an expert....

please give me the details.....


Thanks
Re: Using Script to startup database [message #417198 is a reply to message #417194] Thu, 06 August 2009 08:14 Go to previous messageGo to next message
ThomasG
Messages: 3123
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
If you are not an expert then why do you want to write your own script to do the same things that the scripts supplied by oracle already do?
Re: Using Script to startup database [message #417217 is a reply to message #417194] Thu, 06 August 2009 10:18 Go to previous message
Mahesh Rajendran
Messages: 10630
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>please give me the details.....
What exactly?
I already gave all the details you want.
As said before,
Quote:
This is simple script.
Improvise it and make it any fancier you want.
Previous Topic: To practice unix stuff
Next Topic: HP-UX cdrom - - - Invisible setup file
Goto Forum:
  


Current Time: Mon Dec 22 19:11:41 CST 2014

Total time taken to generate the page: 0.09655 seconds