-
Default database?
Hi All
I create second database in the same machine (linux redhat 7.3 and oracle8i) but I cannot start all of the database (2 database) in the same time.
1. How can I do that? Please suggestion.
2. What is the default database? (If I try to connect by not specify host string)
Thank you so much
Tengman
-
Re: Default database?
Originally posted by tengman
Hi All
2. What is the default database? (If I try to connect by not specify host string)
Thank you so much
Tengman
It wud be the first database u created........
Try login and check urself na......
I have idea about how t change on Windows platform but no idea on linux
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
Hi
Suppose you have tow databases d1 and d2..then in order to connect to the d1 database do
export ORACLE_HOME=your_oracle_home
export ORACLE_SID=d1
now when you say sqlplus you would be connected to d1 database
If you wanna connect to d2
export ORACLE_HOME=your_oracle_home
export ORACLE_SID=d2
now when you say sqlplus you would be connected to d2 database
regards
Hrishy
-
Hi Hrishy
Suppose I have 2 database knows as d1 and d2.
I started d1 database and I would like to start d2 by use startup command but I got the message as below"ORA-01081: cannot start already-running ORACLE - shut it down first"
Please suggest me again.
Thank so much
tengman
-
As Hrishy said you need to set the ORACLE_HOME and ORACLE_SID environment variables before you attempt to start the second database.
Code:
$export ORACLE_SID=d2
$export ORACLE_HOME=you_oracle_home
$sqlplus /nolog
SQL>connect / as sysdba
Connected
SQL>startup
Regards
Jim
Oracle Certified Professional
"Build your reputation by helping other people build theirs."
"Sarcasm may be the lowest form of wit but its still funny"
Click HERE to vist my website!
-
Default database
Hi,
Thsi problem can be sorted out by creating env files. An env file can look like this:
ORACLE_SID=
ORACLE_HOME=
export ORACLE_SID ORACLE_HOME
This file should have executable permission.
You can have n number of files like this corresponding to your DBs.
Any one of these files you can attach in your .profile/.bash_profile as
". "
Further u, can have a shell script, which calls all these env files one-by-one and then startup each DB. A sample shell script can look like this:
file: startalldb.sh
.
svrmgrl <
connect internal
startup
exit
EOF
.
svrmgrl <
connect internal
startup
exit
EOF
Again you should have exe permission for this file.
This file can be called on login or after login from one of your shells.
Further you can have check whether a specific db is up or not with the comand string:
dbcnt=`ps -fe | grep pmon | grep | grep -cv grep`
if [ $dbcnt -eq 1 ]; then
echo "DB already up"
exit 0
fi
Hope this will serve you.
Regards,
Eldo.
-
Or you can set the environment using the ORAENV script. (I'm assuming that it's availaible in Linux)
Regards
Jim
Oracle Certified Professional
"Build your reputation by helping other people build theirs."
"Sarcasm may be the lowest form of wit but its still funny"
Click HERE to vist my website!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|