how to set up second instance? - General Database Discussions

I would like to know the steps on how to set up a second
instance on oracle on linux. Thanks. 

Run "dbca" in the Oracle bin dir. This is the Database
Configuration Assistant

Related

upgrading 10.2.0.1 to 10.2.0.3: Upgrade assistant failed to bring up db

Hello,
I am in the process of upgrading my database from 10.2.0.1 to 10.2.0.3.
OS is Solaris (Sparc 64). I have two database instances running, one is a recovery catalog. I am not using RAC or ASM, etc...
I have been following upgrade instructions, the steps I have taken so far are:
1. Took down database instance, enterprise manager, listener, isqlplus
2. Ran the runInstaller and upgraded successfully
3. Ran the root.sh script
4. started listener (but I get no services)
5. Ran the dbua and selected the database I would like to upgrade
Next, I get an error message that states the following:
The Upgrade Assistant failed in bringing up the database CAPDB. Oracle Home /ora01/home2/oracle/product/10.2.0/db_1 obtained from file /var/opt/oracle/oratab was used to connect to the database. Either the database is not running from Oracle Home /ora01/home2/oracle/product/10.2.0/db_1 or the correct Initialization Parameter file (pfile) was not found. To start the database, Oracle needs the pfile. Provide the full bath name of the init file for the database CAPDB.
I checked and my ORACLE_SID, PATH and ORACLE_HOME are set correctly.
I also tried to start the database using sqlplus:
1. connected to sqlplus as sysdba (got message connected to an idle instance).
2. Tried startup command and got message
LRM-00109: could not open parameter file '/ora01/home2/oracle/product/10.2.0/db_1/dbs/initCAPDB.ora'
I did not have these problems before running the patch to 10.2.0.3, any ideas what could be going on?
Thanks!
- Brian 
What's your ORACLE_HOME set to ?
Is it /ora01/home2/oracle/product/10.2.0/db_1 ?
When you do
ls -l /ora01/home2/oracle/product/10.2.0/db_1/dbs/initCAPDB.oraWhat's the result?
Is your ORACLE_SID CAPDB ?
Did you use spfile or pfile ? 
Yes, my ORACLE_HOME is set to:
/ora01/home2/oracle/product/10.2.0/db_1
and my ORACLE_SID is set to:
CAPDB
The file initCAPDB.ora does not exist in that location, or any location for that matter (i ran a find). If the database is supposed to be using initCAPDB.ora I would think it should be in that location, I doubt the 10.2.0.3 upgrade would have deleted it.
There is a file in that location called spfileCAPDB.ora. After the error message, it gives me the option to enter the full path of the init file for the database. I tried to enter:
/ora01/home2/oracle/product/10.2.0/db_1/dbs/spfileCAPDB.ora
but that gives me the error:
The Upgrade Assistant failed in bringing up the database CAPDB. Oracle Home /ora01/home2/oracle/product/10.2.0/db_1 obtained from the file /var/opt/oracle/oratab was used to connect to the database. Either the database is not running from Oracle Home /ora01/home2/oracle/product/10.2.0/db_1 or the pfile /ora01/home2/oracle/product/10.2.0/db_1/dbs/spfileCAPDB.ora used is incorrect. Correct the error and run the Upgrade Assistant again
From that error it seems like it is looking for a 'pfile' and I am giving it an spfile?
I'm not sure where to go from here, any suggestions?
Thanks
- Brian 
OK, I just read that all databases 9i and above use spfiles instead of pfiles so it makes sense that the spfileCAPDB.ora is in that location but I'm still not sure why it isn't working... 
There is problem with your spfileCAPDB.ora
Have you seen the pre requitsites....??
If any thing are missing before Upgradition...U have do... 
I followed the install documents step by step when doing the upgrade. Based on my installation (10.2.0.1 and no RAC, ASM, Clusterware, Database Vault, etc...) it looks like the only things I had to do before install was to:
1. Make sure the time zone definitions were up to date (which I did)
2. Make sure to shut down the database instances, listeners, Enterprise Manager and isqlplus, which I did as well.
Is there anything anyone can think of that I may have missed?

ASM not detected

I have create two homes on VISTA. ASM instance is also created and running. Problem is when i run dbca to create database from other home it does not detect ASM instance. However, if i run dbca from ASM home it detects. Any ideas how can it be detected from other home? 
did you receive any error? 
No i am not getting error. But dbca diplays a popup showing that there is no running ASM instance and create a new one. I think, in case of Unix this problem is due to bad entry in oratab but i am not sure how Oracle check running instances in windows. 
If I understood your issue .. you have two Oracle homes, one for ASM and another for RDBMS and when you try to create the RDBMS instance, it does not work..Check your ORACLE_HOME environment variable.. where is it pointing to..
since this is windows,.. I will also check the default path.
You should run dbca from the $ORACLE_HOME/bin directory.. 
Hmm..you didnt mention which version!!
Where (which OH) is the listener running from? 
is ASM installed on every node ? not only on one ?
is the ASM instance registered in the oratab file ?
marc

How to let database(10.2) auto startup when linux reboot?

Hi all,
I installed oracle database 10.2 in linux (x86),and created a database.
I can startup the database manually. But database can not be started up automatic when linux starts up.
How to let database startup automatic when OS starts up?
the details shell scripts for auto startup would be appreciated!
Thanks 
Hi,
IN /etc/oratab file go and set the flag to Y to autostart
Chandra 
Go to /etc/oratab file. There is an entry for database configration. The first entry contains database SID, second it's HOME and third whether to start database at startup or not. By default it is set No (N) make it Y. 
Hi,
IN /etc/oratab file go and set the flag to Y to
autostart
ChandraI did. But it doesn't work.
Any further advice? 
I am also having the same problem starting AS 101202 when RedHat 4.4 restarts. There has to be an easy way to get everything to start when the server reboots.
Entries in /etc/oratab
infdev02:/u01/app/oracle/infra101202:Y
*:/u01/app/oracle/as101202:Y
*:/u01/app/oracle/dev10:Y 
I don't know LINUX but I know Solaris. In Solaris, you have a startup and shutdown script in $ORACLE_HOME/bin. Setting the field to Y in oratab means you startup/shutdown the instance when executing the scripts. However, it does not mean the startup script will be
executed upon reboot. In solaris, we place a script in /etc/rc3.d. Then the script will be executed upon reboot. Guess you have similar features in Linux. 
You refer the Oracle installation manual and look for steps listed in post installation tasks.
Ashok 
Can you show the steps?

ORACLE_HOME

Hi,
I had a database instance (say test_1) in my server and its home was /app01/app/oracle/product/10.2.0 ( This is 10.2.0.3 on RHEL 4). I did not created a sub directory for this instance like (/app01/app/oracle/product/10.2.0/*db_1*) B'cos I did not know that there are other instances are going to be in this same server. But now I want to install another instance say (test_2) and when I tried to have its home as /app01/app/oracle/product/10.2.0/db_2 it gave me an error saying that oracle-home already exists there in this location.
So I removed the oracle homes using oui. Now I want to install a fresh ORACLE_HOME in /app01/app/oracle/product/10.2.0/db_1 for my test_1 instance. (I have shut it down. I don't need this until I fix the Oracle_Home. Even If I have to create a new instance it is OK. So don't worry about the instance. ) and another home /app01/app/oracle/product/10.2.0/db_2 for my test_2 instance.
Now I tried to install freshly from /home/oracle/../database/ I tried to run the runInstaller, it is giving me this error.
OUI-10199: Unable to create home "OraDb10g_home1" at "/app01/app/oracle/product/10.2.0/db_1". There are existing homes with the same name and the same location.
But I have deleted those Oracle homes. How do I fix this mess? Am I overseeing anything?
Please help. 
Please follow http://download-uk.oracle.com/docs/cd/B19306_01/em.102/b16227/oui3_manage_oracle_homes.htm
regards 
pransuj wrote:
Hi,
I had a database instance (say test_1) in my server and its home was /app01/app/oracle/product/10.2.0 ( This is 10.2.0.3 on RHEL 4). I did not created a sub directory for this instance like (/app01/app/oracle/product/10.2.0/*db_1*) B'cos I did not know that there are other instances are going to be in this same server. But now I want to install another instance say (test_2) and when I tried to have its home as /app01/app/oracle/product/10.2.0/db_2 it gave me an error saying that oracle-home already exists there in this location.
So I removed the oracle homes using oui. Now I want to install a fresh ORACLE_HOME in /app01/app/oracle/product/10.2.0/db_1 for my test_1 instance. (I have shut it down. I don't need this until I fix the Oracle_Home. Even If I have to create a new instance it is OK. So don't worry about the instance. ) and another home /app01/app/oracle/product/10.2.0/db_2 for my test_2 instance.
Now I tried to install freshly from /home/oracle/../database/ I tried to run the runInstaller, it is giving me this error.
OUI-10199: Unable to create home "OraDb10g_home1" at "/app01/app/oracle/product/10.2.0/db_1". There are existing homes with the same name and the same location.
But I have deleted those Oracle homes. How do I fix this mess? Am I overseeing anything?
Please help.Besides the mess you've created, the biggest thing you are overlooking is that you don't have to install an additional oracle home for each instance. That would be like createing a different installation of Excel for each workbook. 
Hello,
But I have deleted those Oracle homes. How do I fix this mess? Am I overseeing anything?How did you delete these Oracle Homes ?
Did you use OUI to uninstall the unnecessary installations or did you delete them manually ?
Oracle records the software installations in the oraInventory. So deleting manually the files is not the right way, you would better use OUI. OUI can update the oraInventory accordingly to the components you install or uninstall.
The link previously posted will help you.
Best regards.
Jean-Valentin 
I did used the OUI to delete the ORACLE_HOMES.
The mistake I was doing was, as it is said in this thread, I was doing new installations for the new instances. I am redoing the whole set up for the server. I think this time I will get it right. 
Hi,
This time I did the first instance correctly. I have created the instance in /app01/app/oracle/product/10.2.0/db_1. The first instance is working as it is supposed.
Now I want to install the second instance. Again this is not a different version. This is the same version. as the first instance.
The dbinstance is say db_test2. The home I want for this one is /app01/app/oracle/product/10.2.0/db_2. How do I do this? If I run the dbca from /app01/app/ora../pro../10.2.0/db_1/bin then I cannot set the ORACLE_HOME. So I have to run the runInstaller to install again (Which is not needed). How do I set up the second instance.
Thank you, 
pransuj wrote:
Hi,
This time I did the first instance correctly. I have created the instance in /app01/app/oracle/product/10.2.0/db_1. The first instance is working as it is supposed.
Now I want to install the second instance. Again this is not a different version. This is the same version. as the first instance.
The dbinstance is say db_test2. The home I want for this one is /app01/app/oracle/product/10.2.0/db_2. Please refer to my reply of June 28 (above) which you flagged as 'CORRECT'. Let me state again ---- you do not need to create an additional ORCLE_HOME JUST TO SUPPORT AN ADDITIONAL INSTANCE.
How do I do this? If I run the dbca from /app01/app/ora../pro../10.2.0/db_1/bin then I cannot set the ORACLE_HOME. So I have to run the runInstaller to install again (Which is not needed). How do I set up the second instance.Just run dbca and create the instance. Yes, it will be associated with the first ORACLE_HOME. That is as it should be. Why do you think you want to create an additional ORCLE_HOME. Once again -- ORACLE_HOME is where the ORACLE SOFTWARE resides. The location of the database (the .dbf and other files that make up the database) is totally incidental to ORACLE_HOME. And since the instance is memory and processes - it exists only in memory and does not "reside" in any file system at all.
Thank you,

9iAS

Hi,
please help me on following quesions:
1. I will instll 9iAS on a seperate box from the DB box, do I
need to stop all database and Oracle services before I start the
installer as mentioned in th Installation Guide? or can I keep
them up while install?
2. Do I have to shutdown listener, database before change the
initSid.ora ? or I can do it while database and listener are up,
then shutdown and restart them?
3. How to set ORACLE_OWNER, where and the value?
Thanks 
Hi
1. Not necessary to stop database and other Services if you are
installing in a separate box.
Even if it is in the same machine, this is advisable for NT and
generally not for UNIX
2. To change init.ora parameters, edit init.ora file and then
restart the database.
3. Why do you want to set ORACLE_OWNER value. It is not
necessary for 9iAS installation. Set value for ORACLE_HOME and
then proceed with the installation. You can always include other
values in the env variable later
sarath

Categories

Resources