Oracle related error when doing the "Check Upgrade Environment" upgrade step
- Article Type: General
- Product: Aleph
- Product Version: 20, 21, 22, 23
Description:
When doing the "Check Upgrade Environment" from the upgrade util menu, we get this error:
Cannot connect to the data base: ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)
We can go into sqlplus and do things (e.g., desc z00). Our DBA did some checking and can successfully connect through the oracle client, and sqlplus is fine also. Is there a known solution for this?
-- Further Info --
The current TNS information:
LOON.ALEPHTST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = loon)(PORT = 1521))
(CONNECT_DATA =
(SERVICE = alephtst.exlibris.int.il)
(SID = ALEPHTST)
)
)
The TWO_TASK configuration is different in aleph_start from what it is in v. 19. That is, aleph_start in v. 20 as delivered has:
setenv aleph_db ${ORA_HOST}.${ORACLE_SID}
if ($ORA_HOST != $Z39_HOST) then
setenv TWO_TASK $aleph_db
setenv ora_connect_mode LISTENER
endif
And aleph_start in v19 has this as configured and delivered with the original aleph_start:
setenv aleph_db ${ORA_HOST}.${ORACLE_SID}
setenv TWO_TASK ${ORA_HOST}.${ORACLE_SID}
So TWO_TASK is not getting set in aleph_start for version 20 because $ORA_HOST does equal $Z39_HOST.
aleph@loon(a20_1):~/a20_1/alephm>echo $TWO_TASK
TWO_TASK: Undefined variable.
aleph@loon(a20_1) PWD50u> echo $ORA_HOST
loon
aleph@loon(a20_1) PWD50u> echo $Z39_HOST
loon
Would setting TWO_TASK solve this problem? Other ideas?
Another symptom: In trying to run aleph_startup, you get "Oracle not running, aborting..." -- even though Oracle *is* running.
Resolution:
The $aleph_db value (as seen in aleph_start) needed to be added to the $ORACLE_HOME/network/admin/tnsnames.ora -- and Oracle restarted for this to take effect.
That is, if echo $aleph_db shows:
il-aleph23.aleph23
there need to be entries for the following in $ORACLE_HOME/network/admin/tnsnames.ora:
il-aleph23.aleph23_mts
il-aleph23.aleph23
Additional Information
aleph_startup does
cobrun check_oracle_exist ... [./util/check_oracle_exist]
which, in turn, does
CALL "check_oracle" USING ... [./com_io/check_oracle.pc]
- Article last edited: 10/8/2013