![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| start a script from another tty | moka | Shell Programming and Scripting | 1 | 05-05-2008 05:31 AM |
| Auto Start/Stop Didnt Work in Solaris 10 | adzuanamir | SUN Solaris | 0 | 04-22-2008 08:25 PM |
| Modify Perl script to work with txt - Permissions script | joangopan | Shell Programming and Scripting | 1 | 09-12-2007 08:38 PM |
| Script doesn't work, but commands inside work | cheongww | UNIX for Dummies Questions & Answers | 2 | 11-14-2006 06:52 PM |
| Start Up Script | suntan | UNIX for Dummies Questions & Answers | 3 | 07-23-2001 07:03 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
script to start DB didn't work, help
I have created a script to strat and shutdown Oracle 10g DB on Solaris automatically when UNIX reboot. In the begining, it worked well. All of sudden, the dbstart part didn't work, other 3 part for lsnrctl, emctl, isqlplusctl all worked fine. I think it was TNS_ADMIN variable got problem. Because dbstart need to go to /var/opt/oracle/ to find oratab file. In that file there is a line: my_oracle_sid:$ORACLE_HOME:Y. This will indicate that DB should start up when UNIX reboot. Then dbstart utility will work.
I am not sure that my observation is right or not. Please help me to solve this problem. If my guess is right, can I set up TNS_ADMIN variable (TNS_ADMIN=/var/opt/oracle export TNS_ADMIN) in .profile or I have to set it up in my script. Following is the sample of script for your reference. #!/bin/sh ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 ORACLE_OWNER=oracle if [ ! -f $ORACLE_HOME/bin/dbstart ] then echo "Oracle startup: cannot start" exit fi case "$1" in 'start') # Start the Oracle database and listener su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart" su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start" su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole" su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/isqlplusctl start" ;; I set up TNS_ADMIN in my .profile as above and rebooted the server. All other 3 agents started automatically. I did $ORACLE_HOME/bin/dbstart, the server responded as 'VER10LIST=10: is not an identifier'. So where is the problem? I have another UNIX server running the same script, it worked perfectly. No idea. Please advise. Last edited by duke0001; 02-16-2007 at 11:04 AM. |
|||
| Google UNIX.COM |
| Forum Sponsor | ||
|
|