hi everybody;
I have a rhel4u3 A.S server; oracle db 10g and oracle IAS application server is installed ;
to set enviorement variables ;I have added some lines to .bash_profile of the oracle user ;
[root@orcl ~]# su - oracle
1. Database
2. Application Server
according to the selection enviorement variables and paths are set ;
here is the code ;
1 # .bash_profile
......
15 echo "1. Database"
16 echo "2. Application Server"
17 read ans
18
19 if [ $ans -eq 1 ]; then
20 DISPLAY=:0.0; export DISPLAY
21 ORACLE_BASE=/oracle/db/app/oracle/; export ORACLE_BASE
22 ORACLE_HOME=$ORACLE_BASE/product/10.2.0/; export ORACLE_HOME
23 ORACLE_SID=orcl; export ORACLE_SID
24
......
33 elif [ $ans -eq 2 ]; then
34 ORACLE_BASE=/oracle/ias/app/oracle/; export ORACLE_BASE
35 ORACLE_HOME=$ORACLE_BASE/product/ias; export ORACLE_HOME
.......
43 else
44 echo "WARNING! ORACLE_HOME is not been set"
45 fi
To sum up when the user logs in then ; he enters 1 or 2 to set the variables interactively;
The thing ı want to do is to start the database and application server when server reboots ; so I edited the /etc/oractab file and added the a service named
dbora;
as S99dbora and K01dbora to run level 3,5
but when the service tries to start ; the menu appears and wants a selection ; how can I prevent this happening and giving parameter ;
ın fact I thougt to set the variables in the dbora service but then it would be executed as root ; but oracle must be started with oracle user ;
so I used the way seen below ..
#!/bin/sh
....
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl start"
.....
That is all ; tahnks for ant help..
Tamer ONEM
RHCt --- > but will be RHCE