how to set env variables for oracle 10g xe ??
iam new to both linux & oracle, when i try to run sqlplus from the shell it gives me this error
bash: sqlplus: command not found i have figured that i have to set the envoirnment variables but how???? i will be very thankfull !! |
In ~/.bash_profile I have the following variables set up for a test instance of Oracle 10g:
Code:
export ORACLE_BASE=/u01/app/oracle Code:
$ vim ~/.bash_profile |
thanx
i really appreciate your help but i cannot seem to find the file you posted to edit that is bash_profile
so if any further info plz help |
From a terminal window, what do you get when you type this?
Code:
ls -l ~/.bash_profile Code:
ls -l /home/username/.bash_profile Code:
touch ~/.bash_profile && vim ~/.bash_profile |
did it
i did create a bash_profile & entered the path as follows
./usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin as told by the oracle website. now the problem is that how should i make it avaiable for all users not just root and how should i have it so that it runs automatically bcz even now i have to type source ~/.bash_profile to be able to run sqlplus. on top of it the sysdba i have to connect as follows connect sys/passwd as sysdba; if i do connect / as sysdba it gives me the error ORA-01031 so these are the problems i am facing so if u can further elaborate, u r my lifesaver!!! |
i meant this path
source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.csh
|
after running source command
source ~/.bash_profile
bash: setenv: command not found bash: setenv: command not found bash: /bin/nls_lang.sh: No such file or directory bash: setenv: command not found bash: setenv: command not found bash: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.csh: line 10: syntax error: unexpected end of file root@ali-laptop:/home/ali# sqlplus bash: sqlplus: command not found this is what happened after i entered the path??? |
Quote:
To make the change available for everyone, it should be in /etc/profile. If you're having to source ~/.bash_profile each time, it could mean that your shell is not /bin/bash. You can check this by searching for your username in /etc/passwd and looking at the value for the shell. The problems in the shell script should go away once you have the path set up correctly. Also, I don't recommend running any oracle stuff as root - you really don't need to do that. |
thanks for help
iam really thankfull for ur kind help, my friend told me about bashrc to which i was able to add the PATH which eventually enabled me to use sqlplus from the shell..
thanks again |
sqlplus error
iam new to both linux & oracle, when i try to run sqlplus from the shell it gives me this error
bash: sqlplus: command not found i have figured that i have to set the envoirnment variables but how???? i will be very thankfull !! Can anyone help me |
This is my .bashrc file
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server export PATH=$ORACLE_HOME/bin:$PATH export TNS_ADMIN=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin export ORACLE_SID=XE export LD_LIBRARY_PATH=$ORACLE_HOME/lib |
Any edits to your profile should really go in .bash_profile and not .bashrc
After making the changes in .bash_profile: source ~/.bash_profile or . .bash_profile (from your home directory) |
All times are GMT -5. The time now is 06:26 PM. |