This discussion is archived
5 Replies Latest reply: Jul 9, 2013 3:58 PM by user558987 RSS

Change TNSNAMES.ora location (Discoverer 11g)

user558987 Newbie
Currently Being Moderated


Hi,

 

I have a requirement where I need to modify the tnsname.ora location.

 

I installed Oracle Fusion Middleware Install (11.1.1.7) and then configured the Domain for Discoverer only.

 

The tnsnames.ora location is $DISCO_INST_HOME/config/tnsnames.ora

 

Other than using soft link, can I modify configuration to change the location of TNSNAMES.ora file.

 

Regards

Sumit Sachdeva

  • 1. Re: Change TNSNAMES.ora location (Discoverer 11g)
    Michael Armstrong-Smith Oracle ACE
    Currently Being Moderated

    Hi Sumit

    Try creating an environment variable called TNS_ADMIN. In the variable you can add the path for the TNSNAMES.ORA. If you are using one, you will also need to have your SQLNET.ORA in the same place.

     

    Best wishes

    Michael

  • 2. Re: Change TNSNAMES.ora location (Discoverer 11g)
    user558987 Newbie
    Currently Being Moderated

    Hi,

     

    Thanks for your reply.

     

    When I use the URL from client machine http://ip:8101/discoverer/plus Then by default it takes the $DOM_INST_HOME/config/tnsnames.ora on server.

     

    How can I modify the default location and where shall I specify the new configuration setting. Because environment variable doesnt modfies the default behaviour.

     

    Regards

    Sumit Sachdeva

  • 3. Re: Change TNSNAMES.ora location (Discoverer 11g)
    Michael Armstrong-Smith Oracle ACE
    Currently Being Moderated

    Hello

    I have been doing some more research and it seems the TNS_ADMIN information is hard coded in several files.

     

    I have found it all of these (and there might be more):

    • opmn.xml in $DISCO_INST_HOME/config/opmn/config
    • setDomainEnv.cmd amd setDomainEnv.sh in $Middleware/user_projects/domains/ClassicDomain/bin
    • startscript.xml in $Middleware/user_projects/domains/ClassicDomain/init-info


    I would take a backup of these and try editing to see if that works. So long as you have a backup you should be fine.


    Let me know if this works.

    Michael


  • 4. Re: Change TNSNAMES.ora location (Discoverer 11g)
    Michael Armstrong-Smith Oracle ACE
    Currently Being Moderated

    Hi Sumit

    I have some further information for you courtesy of a contact I have within Oracle.

     

    Yes, you can use the TNS_ADMIN environment variable.

    In fact, in the [middleware_home]\[oracle_instance]\config\OPMN\opmn\opmn.xml it points to the location you mentioned.

    <variable id="TNS_ADMIN" value="$ORACLE_INSTANCE/config/"/>

    you can update the location in the file

    run: [middleware_home]\[oracle_instance\bin\opmnctl reload  (to pick up the new changes in the opmn.xml file

    the next Discoverer session (dis51ws)  started should read the changes.

    If that fails, opmnctl stopall, then opmnctl startall


    I also checked on the other files I mentioned earlier. We believe they are not needed for Discoverer or indeed why they would have that environment variable set there since the metadata repositories in Fusion Middleware use JDBC. They must be for some other generic Weblogic use or some custom java apps.


    The Discoverer binary /server /sessions only read opmn.xml -- so just changing opmn.xml should be sufficient


    Best wishes

    Michael

  • 5. Re: Change TNSNAMES.ora location (Discoverer 11g)
    user558987 Newbie
    Currently Being Moderated

    Thanks Michael

    :-)

     

    That worked perfectly fine.

     

    Regards

    Sumit Sachdeva

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points