AllExperts > Oracle 
Search      
Oracle
Volunteer
Answers to thousands of questions
 Home · More Oracle Questions · Answer Library  · Encyclopedia ·
More Oracle Answers
Question Library

Ask a question about Oracle
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Peter Choi
Expertise
I am a senior Oracle DBA, PeopleSoft Administrator and Project Manager with 10+ years experience. I have been working with PeopleSoft (HRMS 5, 7, 7.x and 8.9), Oracle RDBMS (7.3 - 11gR1) on various Unix and Windows platforms, and some Oracle Application Server (9i/10gR2). I also have experience with the configuration and administration of BEA`s Tuxedo and WebLogic for PeopleSoft 8.x.

 
   

You are here:  Experts > Computing/Technology > Oracle > Oracle > Two Oracle 10g DBs under two different AIX users

Oracle - Two Oracle 10g DBs under two different AIX users


Expert: Peter Choi - 5/12/2009

Question
QUESTION: Hi.
I have AIX Server 5.3 and installed Oracle 10g (10.2).
One DataBase (DB1) already working under oracle user. I
have no problem with it.

I created second user oracle2 and installed second copy of
oracle 10g (10.2) RDBMS for test purpose and already
created a second Database DB2. I can start DB2.

Now I have a little problem.

I do not why but when I start LISTENER (lsnrctl) under
oracle user (to start DB1) DB2 is registered in this
LISTENER:

Listener Parameter File
/u01/oracle/product/10.1.0/network/admin/listener.ora
Listener Log File
/u01/oracle/product/10.1.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=15
21)))
Services Summary...
Service "DB1" has 1 instance(s).
Instance "DB1", status READY, has 1 handler(s) for this
service...
Service "DB1XDB" has 1 instance(s).
Instance "DB1", status READY, has 1 handler(s) for this
service...
Service "DB2" has 1 instance(s).
Instance "DB2", status READY, has 1 handler(s) for this
service...
Service "DB2XDB" has 1 instance(s).
Instance "DB2", status READY, has 1 handler(s) for this
service...
The command completed successfully

I need two separated LISTENERs and ports for two databases.

The suggestion was to execute this command under oracle2
(DB2) user.
SQL> ALTER SYSTEM SET
LOCAL_LISTENER="(ADDRESS=(PROTOCOL=TCP)(HOST =
hostname)(PORT =1522))" SCOPE=SPFILE;

But what about DB2 registartion in the oracle LISTENER ?

Thanks in advance.




ANSWER: Hi Magerram,

1. You need to make sure that you have defined 2 separate Oracle Homes. If user oracle1's $ORACLE_HOME (Unix environment) variable is defined as /u01/oracle/product/10.1.0/, then your oracle2's $ORACLE_HOME (Unix environment) variable should be defined as /u01/oracle2/product/10.1.0/.

In Unix, to see waht the variable is set to, type:

prompt> set

You will see a list of unix environment variables. Look for ORACLE_HOME. If you don't see one, then it has not been set.

2. I suspect that you've installed the Oracle software (or binaries) in two physical location. The two oracle users, oracle and oracle2 are in the same group. Thus when you use the same ORACLE_HOME to configure your network services, they would default to the first installation under the oracle user.

3. To have separate listeners, you need to disassociate the DB2 (second database instance) from your network configuration in

/u01/oracle/product/10.1.0/network/admin/listener.ora

You will be required to stop the listener and remove entries relating to DB2.

4. Log off user oracle. Login in as oracle2.

5. Set your ORACLE_HOME to /u01/oracle2/product/10.1.0/ (as specified here: Configuring the oracle User's Environment (
http://download.oracle.com/docs/cd/B19306_01/install.102/b19075/pre_install.htm#...) This is needed to make sure that Oracle uses the setup of oracle2.

6. Configure your TNSNAMES and LISTENER.ORA files making sure that it is within the path defined for user oracle2.


Reference: Configuring and Administering the Listener:
http://download.oracle.com/docs/cd/B19306_01/network.102/b14212/listenercfg.htm#...

Hope this helps.

Peter

---------- FOLLOW-UP ----------

QUESTION: Thanks for your complete answer.

I have one more, if you have no objection.

ALTER SYSTEM SET
LOCAL_LISTENER=”(ADDRESS=(PROTOCOL=TCP)(HOST=ip_address)(PO
RT=1523))” SCOPE=SPFILE - helped me.

Then I just configured listener.ora and tnsnames.ora files
with appropriate parameters: different port number,
different SID, same host ip address, and also different
EXTPROC. Actually I do not know what is it for (EXTPROC)
but I made them different, this parameter is vary in both
listenerss configuration files (EXTPROC0 and EXTPROC1) - is
this correct?

After that the second instance started successfully with no
listener error. Thanks.

But ...

First Oracle RDBMS - /u01/app/oracle/product/10.2.0/db_1
Second Oracle RDBMS - /u02/app/oracle/product/10.2.0/db_2

Is that an error ?
I mean, I installed two RDBMS on different drives for
performance purpose.
The names are different to avoid a mistake in configuration
files.

But anyway I do not how can I unregister second database
instance from first listener.

You send me very useful links, but I am not an expert in
Oracle, that's why I run into doubts.

Is it possible to use this command for first Oracle RDBMS:

ALTER SYSTEM RESET LOCAL_LISTENER SCOPE=SPFILE SID='*';

And after just register:

ALTER SYSTEM SET
LOCAL_LISTENER=”(ADDRESS=(PROTOCOL=TCP)(HOST=ip_address)(PO
RT=1521))” SCOPE=SPFILE

Can this solution help me ?

Thanks for your help.

Answer
Hi Magerram,

By using the ALTER SYSTEM SET LOCAL_LISTENER, you are forcing that database to use the specified listener. If that specified listener is not available or running, it would default to the original listener.

It is a work around and yes it can and if done correctly it will work.

Reference for AIX: Oracle Installation Guide: http://download.oracle.com/docs/cd/B19306_01/install.102/b19075/toc.htm

Oracle Listener Administration Reference: http://download.oracle.com/docs/cd/B19306_01/network.102/b14212/toc.htm

There is an Oracle tool called Oracle Net Manager (On UNIX, run netmgr from $ORACLE_HOME/bin) that you can use to configure your listener.

A question that I have, where are your two databases installed?

You had mentioned you had installed 2 oracle homes (installing the binaries twice) for performance gain. That's not quite correct. You need to install the software once. However, the databases needs to be created on different mount points so as to minimize I/O between your databases.

For 10g (it's different with 11g), Oracle recommends following the standards in this section of the documentation, called the Optimal Felxible Architecture (or OFA): http://download.oracle.com/docs/cd/B19306_01/install.102/b19075/app_ofa.htm#sthr...

If you take a look at table D-7 of the above reference, you can see how multiple databases can be created and managed with one Oracle Home.

I would recommend that you spend some time reviewing the manual, 2-Day Oracle DBA: http://download.oracle.com/docs/cd/B19306_01/server.102/b14196/toc.htm

Which would provide a good reference for administering your database.

So in the short term, yes the solution can work. However your recovery solution may not be so straight forward (as your configuration is customized and not based on standards).

In answer to your question about EXTPROC. This is used to invoke EXTernal Procedures. (Refernece: http://download.oracle.com/docs/cd/B19306_01/network.102/b14212/advcfg.htm#sthre...)

Hope this helps.

Peter  

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.