i have solved the problem and since nobody bothered to answer my question i am answering it for myself (thinking about future) and to anybody for whom it might be useful:
the example i take here involves three databases say (db1,db2 & db3) all in one oracle database server (i have 9i, yours maybe different).
first find the oratab file oracle is using (mine is /etc/oratab, yours maybe different)
here's a sample:
Quote:
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
#*:/oracle/product/9.2.0:Y
db1:/oracle/product/9.2.0:Y
#backup:/oracle/product/9.2.0:Y
db2:/oracle/product/9.2.0:Y
db3:/oracle/product/9.2.0:Y
|
you see the last 5 lines, these are the important lines. it tells oracle what to start and what not to. the script is pretty much self explanatory. the first field is ORACLE_SID and the dbstart script uses it to fire up databases. an * means all (but i am not confident so i am not using it). i have three separate lines for my three databases (2nd, 4th & 5th lines). the middle part says about the ORACLE_HOME and the third field (after colon) specifies whether to auto start the database or not. since i want to fire up all three databases at system startup, i have put them as 'Y' (yes).
next go find init.ora files. it must be in your dbs directory under your $ORACLE_HOME (mine is there your's may be elsewhere). there is one init file per database and the filename convention is init($ORACLE_SID).ora
so my three databases have three init files initdb1.ora,initdb2.ora and initdb3.ora respectively. if only one is present and the other's are not (as in my case) simply copy the existing one to other two and name it respectively. from now on i have three database init files (since i made two copies of the existing one). now open the newly copied files and edit it to suit your needs. i only had to change all the occurences of db1 to db2 and db3 (in initdb2.ora & initdb3.ora) at several places and it worked for me since my $ORACLE_HOME is same for all three databases. save the file.
with root priv, fire up 'lsnrctl start' then 'dbstart' you should see all your db's starting up one after another. mine did. that's it. its pretty simple isn't it.
NOTE:
the script in the FIRST post is a WASTE OF TIME. DONOT use it. you donot have to run dbstart for each of the databases if you followed the above method. one dbstart with do for all. i will post another script shortly.