When trying to connect to the Harvest database, we're getting the following error:
HServer | 20190708 16:10:09 | ERROR: E0302004d: Cannot connect to the datasource <datasource name> as user <userid> .
HServer | 20190708 16:10:09 | ERROR: [CA Harvest SCM][ODBC 20101 driver][20101]ORA-12154: TNS:could not resolve the connect identifier specified
What is the best way to resolve this problem?
Harvest Software Change Manager all versions with Oracle DBMS
When trying to connect to the database, Harvest will follow a trail to find the Oracle database it needs to connect to.
The idea will be to follow the same trail to find where the problem is.
Harvest will follow a trail to find the Oracle database it needs to connect to. The idea here will be to follow the same trail to find where the problem might be. If it's in steps 1 or 2 that's more of a Harvest configuration problem. If it's in steps 3, 4 or 5 that's more of an Oracle configuration problem. At some point along this path you should encounter the same “ORA-12154” error message. Follow these steps to find the problem
[<userid>@<servername> ~]$ cd $CA_SCM_HOME.
[<userid>@<servername> scm]$ cat HServer.arg | grep datasource
-datasource=harvest
[<userid>@<servername> scm]$ cd $ODBC_HOME
[<userid>@<servername> odbc]$ cat odbc.ini
[ODBC]
Trace=0
TraceFile=odbctrace.out
TraceDll=odbctrace.so
[harvest]
DESCRIPTION=CA SCM
SERVERNAME=orcl
Driver=ptora13.so
[ODBC Data Sources]
harvest=CAI/PT ORACLE
[<userid>@<servername> odbc]$ cd $ORACLE_HOME/network/admin
[<userid>@<servername> admin]$ cat tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <servername>)(PORT = <port>))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
[<userid>@<servername> odbc]$ tnsping orcl
TNS Ping Utility for Linux: Version 12.1.0.1.0 - Production on 09-JUL-2019 10:00:44
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
<oracle home folder>/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = <servername>)(PORT = <port>)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (0 msec)
[<userid>@<servername> odbc]$
[<userid>@<servername> admin]$ sqlplus <userid>@<servicename>
SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 9 10:30:21 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Enter password:
Last Successful login time: Tue Jul 09 2019 09:42:57 -04:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[<userid>@<servername> admin]$
Once all these tests complete successfully, then Harvest should be able to connect to your Oracle database.