Hi,

We are having a problem with setting up the listener for two instances running on the same unix server.

In our database, oracle software was installed by the default "oracle" user with the default sample database created (say sample9i). The files belong to the "oracle" user in "oinstall" group. The "oracle" user has a secondary group of "dba". Then, we manually created another database (say newdb) using another unix user (say "neworacle" with the "dba" group as the primary group).

Currently, our listener is set up as:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/orac901)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = newdb)
(ORACLE_HOME = /opt/oracle/orac901)
(SID_NAME = newdb)
)
(SID_DESC =
(GLOBAL_DBNAME = sample9i)
(ORACLE_HOME = /opt/oracle/orac901)
(SID_NAME = sample9i)
)
)

When we start up the listener from the "oracle" user account, we can connect to sample9i database but when we change the ORACLE_SID=newdb and try to login through sqlplus with:
sqlplus user@newdb

We encountered an error:
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory segment
SVR4 Error: 13: Permission denied

The strange thing is that "tnsping newdb" works.


When we start up the listener from the "neworacle" user account, we can connect to the newdb database but not to the sample9i database.


1. Are we setting up the listener correctly?
2. Do we need to set up 2 listeners? Do the 2 listeners have to be assigned to 2 different ports or can they use the same port?
3. Is there any permissions issues that we need to look into? Should we just set both "oracle" and "neworacle" to the same group?


Thanks in advance for your help,
Jia Lian