Hi all,
I'm working Oracle8.1.7 on Linux(Red Hat7.3) how to set more than sid in the bash_profile if, in case I want to work with more than one database..
Pratheesh
Printable View
Hi all,
I'm working Oracle8.1.7 on Linux(Red Hat7.3) how to set more than sid in the bash_profile if, in case I want to work with more than one database..
Pratheesh
do this
export ORACLE_HOME=/home/saurabh/OraHome1
echo "Input the Sid"
read sid
export ORACLE_SID=$sid
this will ask you the sid you want to set.
as per my understanding of ur question u want to set more than one sid in .bash_profile for multiple database instances .
there is no need in setting more than one SID in .bash_profile because first time u login to the operating system it will always point to one sid . to connect to the other database . u have to set the environment variables again . and login to the 2nd instance.
2nd option is create two different Linux login users and set two different sid's in different profiles.
Two different sessions will also do, if you want to access two databases for time being.
u can use the oraenv facility
You put mutiple entries in the oratab file, and do . oraenv and hey presto your envrionment changes to the sid you require
I could'nt understood exactly that what u said regarding the next setupQuote:
Originally posted by prakashs43
as per my understanding of ur question u want to set more than one sid in .bash_profile for multiple database instances .
there is no need in setting more than one SID in .bash_profile because first time u login to the operating system it will always point to one sid . to connect to the other database . u have to set the environment variables again . and login to the 2nd instance.
2nd option is create two different Linux login users and set two different sid's in different profiles.
i.e setting the env. variables again..
plz let me clear..
I think, what he meant was to exit from the first database and then set the ORACLE_SID again to point to another database and then login to the 2nd database.
or do as I say and use oracle supplied tools to do it for you, namely oraenv
2nd option is create two unix or linuX users in the operating system assign them both to dba group . now u have two different profiles one for each , set different sid's for fifferent Linux users in .profile
thats just untidy - i dont see the problem in using tools which are already available, to do exactly what you want and to keep managing your system down to a minimum
what if you had 10 instances on a server? you gonna have 10 different users?