I have a question regarding shell settings. I have one Sun server with Solaris 9 and Oracle 10g R2 on it. DB is up running well. I created a script to start DB automatically when server reboot. It didn't work. I manually run dbstart under $ORACLE_HOME/bin, the server return message like:" dbstart: VER10LIST=10 is not an identifier". It seems this a shell problem. The shell couldn't identify this script. On this server, root user and oracle user all use bourne shell /bin/sh.
I ahve 2nd Sun box running Solaris 10 and Oracle 10g R2 too. I manually or automatically execut "dbstart" script under $ORACLE_HOME/bin and it works very well. On 2nd box, root user is bourne shell and oracle is Korn shell. dbstart script should be run by root user when system reboot. So what is the problem on 1st server and why dbstart couldn't be run on bourne shell? Please advise.
yes, this error means that somewhere in the script there is a line:
export VER10LIST=10
this syntax is not supported in bourne shell, it needs to be two distinct commands:
VER10LIST=10
and
export VER10LIST
having said that, if the shell script were correctly written the login shell for the user would not matter. The magic number would identify the interpreter, and if this was Korn(or bash or zsh) shell then problem would not arise.
Thanks for your advice. But I may not agree with you. Because the dbstart script is coming with Oracle 10g software, it is not created by me. On both saver, I used the same Oracle 10g R2 file to install database system. So the dbstart is the same script. On saver one, I login as oracle user first, then su -root user. I created the dbora script as root user and other group user. On 2nd saver, I can login as root user and root group user to create the same dbora script. In dbora script on saver one, 3 out of 4 agent scripts worked, only dbstart didn't work. In dbora script on saver two, 4 agent scripts all worked fine. This is where my problem is.
If login shell doesn't matter, I manually run dbstart script on saver one as $dbstart or $ $ORACLE_HOME/bin/dbstart, system all return 'VER10LIST=10 is not an identifier'. This is checking listener version. Oracle 10g db must use listener 10 to start database. It seems nothing to do with a line in script? If I am wrong, please comment more? Thanks.
You misunderstand. You sometimes have to correct scripts that come with products so they work in your environment - or you have to use a different default shell.
Correction add this to the top of the script that fails - you need to do
in order to find the correct location of ksh:
or change the export statement.
Other choice: change the .profile in the login directory for the account. Use another shell that supports the syntax. Bourne is VERY antiquated and a lot of products assume that systems have modern shells.
The login shell of the user does matter if the scripts does not indicate on the first line what kind of shell it is supposed to run in.
So, if the script, as indicated, does contain a line like:
the login shell does not matter.
However if this line is missing the login shell does matter.
Most likely this line is missing in your script.
On 1 system there will be a Born (sh) shell as login shell, where on the other there will be a Korn (ksh) or even Bash (bash) shell as login shell.
There is no #!/bin/sh or #!/bin/ksh in the begining.
On saver one, I login as Bourne shell at path: /u01/app/oracle. On saver two, I login as Korn shell at path: /u01/app/oracle. Only differences are: I can manually execute dbstart at saver two and I can not execute manually dbstart on saver one. System will return "VER10LIST=10 is not an indetifier" from saver one. So how can I undrstand this. The same oracle-generated script and under different shell. But rember: dbstart is only used to start database when system reboot so it should be run by root user. In my two scripts that I used to execute dbstart script, I do put #!/bin/sh in the begining, Even saver two oracle user in under korn shell. My script still worked fine. Saver one root user and oracle user are all under bourne shell, it seems that #!/bin/sh should work. But the fact is that it didn't work. Please give me more tips. Thanks.
There is no #!/bin/sh or #!/bin/ksh in the begining.
On saver one, I login as Bourne shell at path: /u01/app/oracle. On saver two, I login as Korn shell at path: /u01/app/oracle. Only differences are: I can manually execute dbstart at saver two and I can not execute manually dbstart on saver one. System will return "VER10LIST=10 is not an indetifier" from saver one. So how can I undrstand this. The same oracle-generated script and under different shell. But rember: dbstart is only used to start database when system reboot so it should be run by root user. In my two scripts that I used to execute dbstart script, I do put #!/bin/sh in the begining, Even saver two oracle user in under korn shell. My script still worked fine. Saver one root user and oracle user are all under bourne shell, it seems that #!/bin/sh should work. But the fact is that it didn't work. Please give me more tips. Thanks.
Since the script doesn't contain a line at the beginning stating the shell to run in, it will run on server 1 within a Born shell and on server 2 within in a Korn shell.
As mentioned before the script will contain a line:
export VER10LIST=10
In a Korn shell this is a valid statement, however not in a Born shell.
Either change the login shell on server 1 to a Korn shell or put the following line at the beginning of the scripts:
Hi,
I am trying to customize the command prompt of the C shell as follows:
set prompt=" "
The above one works fine but when I try to add a '$' (dollar) symbol into the string as
set prompt=" " I am getting the error as: Illegal variable name
However, this one set prompt = "-- %T %n %~ --... (2 Replies)
the way that i use to backup my server is using the script below in ssh.
mysqldump --opt -Q -u username -p password > /var/www/squiro/sql/database.sql
but i want to set the server backup everyday at 1pm in same folder.
is that set it in crontab-e?
how to set it? (3 Replies)
Hi,
I am trying to set-up a samba server at my red-hat machine in order to be accessed via windows, below are my current configuration
Linux IP : 192.168.1.6
Windows IP : 192.168.1.2
-- I am able to ping from windows to linux machine :
Pinging 192.168.1.6 with 32 bytes of data:
Reply... (2 Replies)
Hi,
We are facing an issue while setting up printers in solaris 5.10 . We have Oracle EBS installed over it. We have configured the printer and when we try printing a page from EBS it is printing fine. But the problem arises when we print two copies of the page. The first page is printing fine... (5 Replies)
I changed the standard Ulimit sometime back. But when I change it back, the setting does not get updated.
How do I make the change permanent
Waitstejo (7 Replies)
Hi All
I'm attempting to automate the process of setting the DISPLAY environment variable when logging on (sourcing the .cshrc).
I have a mixture of linux and solaris servers and this comnand:
who -m | awk '{ print $6}' | tr -d '()'
seems to work on all the servers.
I want... (2 Replies)
Hello there,
I installed Ajaxterm on my Ubuntu 9.04 machine, and it's running ok if I use : http://localhost:8022/ in my browser. The problem is that I wanted to be able to acces it from somewere else through the internet. I read some instruction and help sites related to this problem, like :... (2 Replies)
please send me format for wriiting classpath in shell script
this is my shell script
---------------
#! /bin/bash
javac File1.java
/usr/bin/java File1
--------------------------
the script works fine on termianal but in cron it gives me error saying class defination not found
... (1 Reply)
Hi, I m trying to change the env variable from the c program which inturn calls another c executable. i m using the putenv function but it does not set the value as required , it overwrites the values with some other values...
i m using following cmd's to set the env variable FULL_PATH :
... (3 Replies)
I am trying to install the pkg-get package to a fresh install of Solaris 10. I am able to download and install correctly using the default directory for both pkg-get and wget as found on blastwave.org. When I issue the command "which wget and which pkg-get" it returns no wget or pkg-get found in... (1 Reply)