working through service name odbc.ini tnsnames.ora service names how to configure

Document ID : KB000101635
Last Modified Date : 11/07/2018
Show Technical Document Details
Introduction:
TRying to work thru service name / odbc.ini / tnsnames.ora / server names again. new installation of R13 to new production server and getting error starting hserver. related to 'harvest' service name not found.
Instructions:
To configure all the settings necessary to allow your HServer to connect to the Harvest database:
  1. You need to be logged in to the Linux box as the “cascm” user.
  2. Check your environment variables.  You should have:
    • ORACLE_HOME set to the home folder for your Oracle client.  If SCM is 32-bit, then 32-bit client.  If it’s 64-bit, then 64-bit Oracle client
    • ORACLE_SID set to the SID for your Harvest database
    • PATH should contain $ORACLE_HOME/bin
    • LD_LIBRARY_PATH should contain $ORACLE_HOME/lib
  3. Check the $ORACLE_HOME/network/admin folder for a “tnsnames.ora” file.  Make sure it’s world-readable, and contains a paragraph with the information that points to the host name, port number and service name of your Harvest database in Oracle.
Here is an example:
User-added image
Remember the TNS Service name at the beginning of the paragraph.  This is what we will use to make the connection.  If you don’t have this file, or don’t have a paragraph that points to your Harvest database, the easiest thing to do is locate the tnsnames file on the Oracle server machine and copy from there.
  1. Try to login to the Harvest database with SQL Plus.  If SQL Plus can connect, then harvest will be able to connect as well.  You’ll need to know the Oracle login userid and password to the Harvest database schema owner’s account, and the TNS Service name from your tnsnames.ora file.  Use this command syntax:
sqlplus userid@servicename/password
where:
-    userid = Oracle login userid for the Harvest database schema owner
-    servicename = the TNS Service name you found in step 3 above
-    password = Oracle login password for the Harvest database schema owner

A successful connection will look similar to this:
User-added image
You should try this sqlplus command while logged in as the “cascm” user.  If you do not get a successful connection, work to resolve any connection problems before continuing to the next step.
  1. Execute HDBSetup and use the CO option to configure the “ODBC Data Source” definition for your Harvest database.  You will be asked for a Data Source Name (or to select an existing one if you want to re-use a name that had been configured before), and the Service Name (your TNS service name).  The settings should look similar to this:
User-added image
To confirm the settings, hit “Enter”.
 
Next you will be asked if you want to test the connection.  Type “y” and hit “Enter” to agree.  You will be asked for your DBMS Administrator username [system], and the password for the DBMS Administrator.  If the Harvest database already exists and you are just testing the connection, you can use the Oracle login userid and password for the Harvest database schema owner.  Otherwise, if the database does not exist yet, you will need to use the Oracle administrator credentials.  After typing the password and hitting “Enter” the connection test will happen and you will either see “Connection test succeeded” or any error message that was encountered.  Any problems that are found at this step must be resolved and a successful connection test completed before the HServer can use this information to connect to the Harvest database.
User-added image
  1. Before exiting HDBSetup, it’s a good idea to execute the “EP” option to encrypt the Oracle login userid and password for the Harvest database schema owner.
   
  1. After completing HDBSetup you should check the HServer.arg file in your $CA_SCM_HOME folder to assure that the correct Data Source Name is listed there.
User-added image
  1. After all steps have been completed you can try to start the broker and check the HServer log files to confirm whether the HServer can connect to your Harvest database.