Help - Search - Members - Calendar
Full Version: Creating Multipe DB manullay in Linuc
Oracle DBA Forums > Oracle > Oracle Forum
Oracle_fan
Dear all,

I wanna do the following senario and i need your advice to how to do that

I have oracle 10.1.0.5.0 on linux OS.
i want to create 3 oracle instance manually like this
oracle_sid=x
oracle_sid=y
oracle_sid=z
i prepare the scripts for each instance to create them.
i want to use the .bash_profile for all the 3 instances but i dont know how to do that because when i am doing export oracle_sid, i dont know which one and how to solve this conflict.
i have the following directories
/oracle/app/oracle/10.1.0/dbs
/data/oradata/
i have only one user called oracle and it is the owner for the DB
I prepared the directories for each instanc like that:
/oracle/app/oracle/admin/x
/oracle/app/oracle/admin/y
/oracle/app/oracle/admin/z
and other directories in /data/oradata/

i know in by using oracle assistance, i can create many database and the wizards will take care of everything for me, in matter of fact i did that in windows server for testing purpose, but the problem now is i am trying to create them manually and i have to set up the environment and everything manually, you know what i mean
so what should i do?
should i just lunch the create database statement for each instance and it will update the environment or what
can you provide me with the right steps for doing the whole scenario?
please i need your help

Thank you .
HAL9000
"the wizards will take care of everything for me"

Maybe, but you won't learn anything, and you won't be able to maintain it.

Learn to do it manually. Only noobs rely on OEM, it is a crutch for beginners. For a good get started fast book, try Steve Karam's Oracle jumpstart book, lots of ready to run scripts:

http://www.rampant-books.com/book_2005_1_e...e_jumpstart.htm

And the book on Linux shell scripting for Oracle:

http://www.rampant-books.com/book_2007_1_shell_scripting.htm

As to login profiles, you specify the "default" ORACLE_SID in their /etc/passwd file.

Details are all here:

http://www.remote-dba.net/unix_linux/envir...inistration.htm

You can also make an alias for each instance, so that entering the ORACLE_SID name as a command will do everything that you need:

CODE
#*************************************************************
# Create an alias for every $ORACLE_SID on the UNIX server  
#*************************************************************
for DB in `cat /var/opt/oracle/oratab|\
       grep -v \#|grep -v \*|cut -d":" -f1`
   do
      alias $DB='export ORAENV_ASK=NO; \
      export ORACLE_SID='$DB'; . \
      TEMPHOME/bin/oraenv; \
      export ORACLE_HOME; \
      export ORACLE_BASE=`echo $ORACLE_HOME | sed -e 's:/product/.*::g'`; \
      export DBA=$ORACLE_BASE/admin; \
      export SCRIPT_HOME=$DBA/scripts; export PATH=$PATH:$SCRIPT_HOME; \
      export LIB_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib:/usr/lib '
   done


"i have the following directories /oracle/app/oracle/10.1.0/dbs /data/oradata/"

I would use the OFA standard for directory naming conventions:

http://www.dba-oracle.com/concepts/ofa_guidelines.htm
Oracle_fan
How said i want to do the creating of the databases by using wizards, i prepared everything for creating manually i am using create database statement, i was confisue coz i have multiple databases and i was not know how to configure them in the .bash_profile so when i log in as oracle user, everything will be load for me.
But i really appreciate your help Hal9000 and thank you so much.



QUOTE (HAL9000 @ Jul 20 2008, 11:34 PM) *
"the wizards will take care of everything for me"

Maybe, but you won't learn anything, and you won't be able to maintain it.

Learn to do it manually. Only noobs rely on OEM, it is a crutch for beginners. For a good get started fast book, try Steve Karam's Oracle jumpstart book, lots of ready to run scripts:

http://www.rampant-books.com/book_2005_1_e...e_jumpstart.htm

And the book on Linux shell scripting for Oracle:

http://www.rampant-books.com/book_2007_1_shell_scripting.htm

As to login profiles, you specify the "default" ORACLE_SID in their /etc/passwd file.

Details are all here:

http://www.remote-dba.net/unix_linux/envir...inistration.htm

You can also make an alias for each instance, so that entering the ORACLE_SID name as a command will do everything that you need:

CODE
#*************************************************************
# Create an alias for every $ORACLE_SID on the UNIX server  
#*************************************************************
for DB in `cat /var/opt/oracle/oratab|\
       grep -v \#|grep -v \*|cut -d":" -f1`
   do
      alias $DB='export ORAENV_ASK=NO; \
      export ORACLE_SID='$DB'; . \
      TEMPHOME/bin/oraenv; \
      export ORACLE_HOME; \
      export ORACLE_BASE=`echo $ORACLE_HOME | sed -e 's:/product/.*::g'`; \
      export DBA=$ORACLE_BASE/admin; \
      export SCRIPT_HOME=$DBA/scripts; export PATH=$PATH:$SCRIPT_HOME; \
      export LIB_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib:/usr/lib '
   done


"i have the following directories /oracle/app/oracle/10.1.0/dbs /data/oradata/"

I would use the OFA standard for directory naming conventions:

http://www.dba-oracle.com/concepts/ofa_guidelines.htm
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.