How to add an entry to TNSNAMES.ORA?

Hello,
if I add the following entry to the TNSNAMES.ORA:
test1_10.121.34.56 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.34.56)(PORT = 1521))
(CONNECT_DATA =
(SID = test1)
(SERVER = DEDICATED)
how could I activate it please without rebooting?
I'm using Oracle 9i Release 9.2.0.8.0 at CentOS 4.7
Linux machine (which is compatible to RHEL 4.7).
Thank you
Alex

Hello all, thank you for your support.
Could we please start from the beginning?
(and I'll use the real IP addresses this time, sorry)
{color:#0000ff}oracle@ablora01:admin&gt; <strong>host ablora01.internal.XXX.com</strong>
ablora01.internal.XXX.com has address 10.121.42.100
{color}
I have neither sqlnet.ora nor listener.ora and
I have the following 2 entries in my tnsnames.ora:
{color:#0000ff}oracle@ablora01:admin&gt; <strong>ll /abl/apps/oracle/9.2/network/admin/</strong>
-rw-r--r-- 1 oracle oinstall 825 Jul 26 2003 libnk59.def
drwxr-xr-x 2 oracle oinstall 4096 Nov 5 16:25 samples
-rw-r--r-- 1 oracle oinstall 130 Mar 18 2002 shrept.lst
-rw-r--r-- 1 oracle oinstall 24 Aug 7 2000 snmp_ro.ora
-rw-r--r-- 1 oracle oinstall 717 Nov 5 17:15 sqlnet.log
-rw-r--r-- 1 oracle oinstall 756 Nov 5 17:08 tnsnames.ora
oracle@ablora01:admin&gt; <strong>cat /abl/apps/oracle/9.2/network/admin/tnsnames.ora</strong>
# TNSNAMES.ORA Network Configuration File: /abl/apps/oracle/9.2/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
TEST1_10.121.42.81 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.81)(PORT = 1521))
(CONNECT_DATA =
(SID = test1)
(SERVER = DEDICATED)
BOCHUM_10.121.42.100 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.100)(PORT = 1521))
(CONNECT_DATA =
(SID = BOCHUM)
(SERVER = DEDICATED)
{color}
When I try to tnsping the first entry it works:
{color:#339966}oracle@ablora01:admin&gt;<strong> tnsping BOCHUM_10.121.42.100</strong>
TNS Ping Utility for Linux: Version 9.2.0.8.0 - Production on 05-NOV-2008 17:19:34
Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.100)(PORT = 1521))) (CONNECT_DATA = (SID = BOCHUM) (SERVER = DEDICATED)))
<strong>OK (0 msec)</strong>
{color}
When I try to tnsping the 2nd entry it fails:
{color:#ff0000}oracle@ablora01:admin&gt; <strong>tnsping TEST1_10.121.42.81</strong>
TNS Ping Utility for Linux: Version 9.2.0.8.0 - Production on 05-NOV-2008 17:20:21
Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.81)(PORT = 1521))) (CONNECT_DATA = (SID = test1) (SERVER = DEDICATED)))
<strong>TNS-12541: TNS:no listener</strong>{color}
When I look at the listener I get:
{color:#339966}oracle@ablora01:admin&gt; <strong>lsnrctl status</strong>
LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 05-NOV-2008 17:21:55
Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.8.0 - Production
Start Date 04-NOV-2008 17:35:04
Uptime 0 days 23 hr. 46 min. 50 sec
Trace Level off
Security OFF
SNMP OFF
Listener Log File /abl/apps/oracle/9.2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ablora01.internal.XXX.com)(PORT=1521)))
Services Summary...
Service "BOCHUM" has 1 instance(s).
Instance "BOCHUM", status READY, has 1 handler(s) for this service...
Service "test1" has 1 instance(s).
<strong>Instance "test1", status READY, has 1 handler(s) for this service...</strong>
Service "test1XDB" has 1 instance(s).
Instance "test1", status READY, has 1 handler(s) for this service...
The command completed successfully{color}
When I try sqlnet it first fails and I have to reenter password:
{color:#339966}{color:#ff0000}oracle@ablora01:admin&gt; <strong>sqlplus scott/tiger@TEST1_10.121.42.81</strong>
SQL*Plus: Release 9.2.0.8.0 - Production on Wed Nov 5 17:10:42 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
{color:#ff0000}ERROR:
{color}<strong>{color:#ff0000}ORA-12541: TNS:no listener
{color}</strong>{color}
{color:#ff0000}{color:#ff0000}Enter user-name: scott
Enter password:{color}
Connected to:
Oracle9i Release 9.2.0.8.0 - Production
JServer Release 9.2.0.8.0 - Production
SQL&gt; select * from tab;
TNAME TABTYPE CLUSTERID
BONUS TABLE
DEPT TABLE
EMP TABLE
SALGRADE TABLE
{color}
Do you please know, why it complains about the missing listener?
And my actual target is to allow a program from 10.121.42.81
to connect to the "test1" instance.
Regards
Alex
Edited by: user10507116 on Nov 5, 2008 12:29 PM

Similar Messages

  • How to deactivate an entry in tnsnames.ora file

    Hi all,
    I am working with Oracle 10g enterprise edition. I have a data source named with DEVDATA which should not be affected while I am working on my project. Usually, I will add DEVDATA entry in tnsname.ora file if I want to use it and I will remove that entry from tnsnames.ora file in order to protect that data source. It is very laborious process each time when I want to add or remove that entry. Do we have any mean such a way that I can switch between the two options. Currently, I have a desktop shortcut to tnsnames.ora file so that I can add or remove that entry when ever I want. Can we comment out that entry. Please suggest me.
    I hope this is the right place to fire this question. If not, direct me. Thanks in advance.
    Regards,
    Kumar.

    [email protected] wrote:
    Hi all,
    Thanks for your replays. As you said we can comment out lines with '#'. But, I am looking for commenting whole entry at a time. Can any one tell me how to comment out whole entry/paragraph. Is there any oracle utility by which we can deactivate the data source. Please suggest. Thank you.
    Regards,
    Kumar.As others have said, either comment out each line of the entry, or have two tnsnames files that you rename as needed. But really, how often do you make the swap that commenting/uncommenting about five lines of code is such a burden?

  • How to make SAS Server or datasets entry in tnsnames.ora

    Hi,
    I want to make an entry in tnsnames.ora for SAS Server or SAS datasets.
    Can anybody tell me what all attributes is requried?
    Regards,
    Vikas

    [email protected] wrote:
    Hi all,
    Thanks for your replays. As you said we can comment out lines with '#'. But, I am looking for commenting whole entry at a time. Can any one tell me how to comment out whole entry/paragraph. Is there any oracle utility by which we can deactivate the data source. Please suggest. Thank you.
    Regards,
    Kumar.As others have said, either comment out each line of the entry, or have two tnsnames files that you rename as needed. But really, how often do you make the swap that commenting/uncommenting about five lines of code is such a burden?

  • How to add the entries and how to delete the entries from custom Z-table?

    Hi Experts,
    My requirement is I need to add the entries from program to three custom z-tables . Assume as zabc1,zabc2,zabc3.
    Here how to add the entries from program to Z-table.???
    And one more requirement is I want to provide a deletion checkbox in selection screen . Initial it was unchecked. If I am giving tick mark then the entries should be deleted from above custom Z-tables. this all will done in backgroung job?
    Could you please guide me the logic how to crack this???
    Let me know if you need more Info
    Thanks
    Sanju

    Hi Sanjana,
    What you can do is to use the ABAP keyword INSERT or MODIFY to add or modify records to a given database table. Here are the syntax taken from SAP documentation:
    *Insert Statement
    INSERT dbtab
    Syntax
    INSERT { {INTO target VALUES source }
           | {     target FROM   source } }.
    Effect
    The INSERT statement inserts one or more rows specified in source in the database table specified in target. The two variants with INTO and VALUES or without INTO with FROM behave identically, with the exception that you cannot specify any internal tables in source after VALUES.
    System Fields
    The INSERT statement sets the values of the system fields sy-subrc and sy-dbcnt.
    sy-subrc Meaning
    0 At least one row was inserted.
    4 At least one row could not be inserted, because the database table already contains a row with the same primary key or a unique secondary index.
    The INSERT statement sets sy-dbcnt to the number of rows inserted.
    Note
    The inserted rows are finally included in the table in the next database commit. Up until this point, they can still be removed by a database rollback.
    *Modify Statement
    MODIFY dbtab
    Syntax
    MODIFY target FROM source.
    Effect
    The MODIFY statement inserts one or several lines specified in source in the database table specified in target, or overwrites existing lines.
    System fields
    The MODIFY statement sets the values of the sy-subrc and sy-dbcnt system fields.
    sy-subrc Meaning
    0 At least one line is inserted or changed.
    4 At least one line could not be processed since there is already a line with the same unique name secondary index in the database table.
    The MODIFY statement sets sy-dbcnt to the number of processed lines.
    Note
    The changes are transferred finally to the database table with the next database commit. Up to that point, they can be reversed using a database rollback.
    Hope it helps...
    P.S. Please award points if it helps...

  • How to Add multiple entry to the group policy security filtering

    How to Add multiple entry to the group policy security filtering
    Is there any way we can add multiple entry to the Domain group policy Security filtering tab.Currently its not allowing to add more then one entry at a time.
    Getting Error like "only one name can be entered,and the name cannot contain a semicolon.Enter a valid name"

    Hi
    Are you trying to add more users or groups through Group Policy Management Security Filtering tab?
    Try right clicking on the policy and then edit
    Then in Editor Right click on the name of the policy and Properties
    Security tab and add user or group from this tab. Just make sure if you are adding user or groups "Select this object type" has
    the correct option also "From this Location" is set to your entire directory not the local server.
    Update us with the above.
    Thanks

  • How to add tns entry in names server

    Hi,
    Can anyone tell us, How to add tns entry in names server
    Thanks

    In the Net Manager utility, in the left-hand pane left click Oracle Names Servers, left click on your nameserver.
    Click the "+" button in the upper left, that should be enough to get you started- sorry, all our 9i installs have gone away, can't exactly recall the nix X gui version of client program, but I think* its netmgr, should be in OH/bin.
    If you're running a java OEM console that cames with 9i clients, Net Manager is available on that little Butler tab.
    And for the command line version, running the namesctl utility- you can save a tns entry with the connect string and run it in a file, just like sqlplus, with an @filename:
    vi newtns.txt
    register newtns -d (DESCRIPTION=(ADDRESS_LIST=...(SERVICE_NAME=NEWTNS.MYCO)))
    $ namesctl
    @newtns.txt
    query newtns *
    reload -- nameserver sync
    query newtns *
    exit
    $ Edited by: clcarter on Jul 7, 2011 3:26 PM
    added cmdline version

  • How to add root entry

    Hi folks
    I'm trying to simulate an LDIF file into JNDI attribute set but cant make it
    dn: dc=fifa,dc=com
    objectclass: dcObject
    objectclass: organization
    o: Football Org
    dc: fifa
    dn: cn=Manager,dc=fifa,dc=com
    objectclass: organizationalRole
    cn: Manager
    This LDIF works fine on the command line ldapadd. Highly appreciate your help if anyone can tell me how to simulate these LDIF entries in JNDI way. I'm using openldap on solaris. I can add other entries if this entry is already created using command line ldapadd.
    Thanks in advance

    Ok i made it... there we go...
    import javax.naming.directory.*;
    import javax.naming.*;
    import java.util.*;
    public class AddEntry {
         final static String ldapServerName = "localhost";
         final static String rootdn = "cn=Manager,dc=fifa,dc=com";
         final static String rootpass = "secret";
         final static String rootContext = "dc=fifa,dc=com";
         // obtain initial directory context using the environment
         public DirContext createContext(String name)
              Properties env = new Properties();
              DirContext ctx = null;
              env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
              env.put( Context.PROVIDER_URL, "ldap://" + ldapServerName + "/" + name);
              env.put(Context.SECURITY_AUTHENTICATION, "simple");
              env.put( Context.SECURITY_PRINCIPAL, rootdn );
              env.put( Context.SECURITY_CREDENTIALS, rootpass );
              try
                   ctx = new InitialDirContext( env );
              catch(Exception ex)
                   ex.printStackTrace();
              return ctx;
        public static void main( String[] args )
              AddEntry ae = new AddEntry();
              try
                   DirContext ctx = ae.createContext(rootContext);
                   Attributes root_Dn = null;
                   Attributes cn_Dn = null;
                   Attribute root_objclass = null;
                   Attribute oAttr = null;
                   Attribute cn_objclass = null;
                   Attribute cnAttr = null;
                   root_Dn = new BasicAttributes();
                   root_objclass = new BasicAttribute("objectclass");
                   root_objclass.add("dcObject");
                   root_objclass.add("organization");
                   root_Dn.put(root_objclass);
                   oAttr = new BasicAttribute("o");
                   oAttr.add("Fifa Company");
                   root_Dn.put(oAttr);
                   ctx.createSubcontext("", root_Dn);
                   cn_Dn = new BasicAttributes();
                   cn_objclass = new BasicAttribute("objectclass");
                   cn_objclass.add("organizationalRole");
                   cn_Dn.put(cn_objclass);
                   cnAttr = new BasicAttribute("cn");
                   cnAttr.add("Manager");
                   cn_Dn.put(cnAttr);
                   DirContext ctx1 = ae.createContext(rootdn);
                   ctx1.createSubcontext("", cn_Dn);
           catch ( NameAlreadyBoundException nabe )
                   System.err.println( rootContext + " has already been bound!" );
              } catch ( Exception e )
                   System.err.println( e );
    }

  • How to add environment entry in EJB3 ejb-jar.xml

    Hi,
    Is that a build in way of add environment entries in JDev for EJB 3 beans? For EJB 2 beans you can do that using properties. But the bean properties is not available in EJB 3. Please help.
    Thanks
    Kenny

    Thank you for the reply. But I need a way to enter env-entry value in ejb-jar.xml for EJB 3 in Jdev. In EJB 2, Jdev generate ejb-jar.xml for the bean and also let you add env-entry through bean's properties menu. But in there in no properties menu for EJB 3, also generated ejb-jar.xml is only a empty file doesn't contain any EJB depolyment information. That means you have to code ejb-jar.xml all manually.
    If I am wrong, can someone show me how to do this right?

  • How to add users/entry in the oracle internet directory using XML file

    hi friends,
    i need to know how to add entries, attributes in the oracle internet directory using the XML file.

    I could able to execute the ldapadd command with out error as
    ldapadd -h islch-532.i-flex.com -p 389 -D "cn=orcladmin" -w password -X mypath/filename.xml
    but the data entry is not added in OID. can any one help me out.

  • Duplicate entries in TNSNAMES.ORA

    Hi,
    Is there a bearing or issue if i have duplicate names in TNSNAMES.ORA?
    Thanks

    I don't see any duplication, what I see it is ambiguous and could make errors. Please fix it.Thanks,
    I am actually auditing client's tnsnames.ora. And i found some ambigiuous and duplicate entries.
    I am not allowed to fix any but to report only.
    Here is sample of duplicate and ambiguous entries.
    PROD1 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = abc.phil.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = PROD1)
    PROD2 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xyz.phil.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = PROD2)
    PROD2 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = def.phil.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = PROD2)
    PROD1 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = abc.phil.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = PROD1)
    )Actually there are more that 50 entry names thats why they find it hard to check.
    Thanks
    Edited by: 843228 on Apr 5, 2011 4:24 AM

  • How to add manual entry?

    Hi,
    Can anybody tell me how to add the manual to solaris , what`s the name of the packege.
    Thanks a lot.

    Hi Matt,
    if you speak about CLASSPATH you mean the environment-parameter PATH?
    If yes,
    D:\oracle\MIM\102\BIN>set PATH
    Path=D:\oracle\MIM\102\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wb
    em;C:\j2sdk1.4.2_17-x64\bin;C:\j2sdk1.4.2_17-x64;C:\j2sdk1.4.2_17-x64\jre;C:\j2s
    dk1.4.2_17-x64\lib;D:\usr\sap\MIM\SYS\exe\uc\NTAMD64
    In D:\oracle\MIM\102\BIN i see the follow files:
    06.01.2009  23:27           539.648 OraOLEDB10.dll
    06.01.2009  23:27             1.712 OraOLEDB10.tlb
    06.01.2009  23:27            24.576 OraOLEDB10d.dll
    06.01.2009  23:27             7.168 OraOLEDB10us.dll
    06.01.2009  23:27           146.944 OraOLEDBgmr10.dll
    06.01.2009  23:27            12.800 OraOLEDBpus10.dll
    06.01.2009  23:27             9.216 OraOLEDBrfc10.dll
    06.01.2009  23:27             7.168 OraOLEDBrmc10.dll
    06.01.2009  23:27           187.904 OraOLEDBrst10.dll
    06.01.2009  23:27            17.408 OraOLEDButl10.dll
    Mfg
    Rainer

  • How to add backdated entry to calender

    I am trying to add an entry in the past and it just disappear from the screen after a couple of seconds, i have just updated my ipad and iphone could the new update have caused this clich!!
    thank you
    Simone

    Settings>Mail, Contacts, Calendar>Calendars>Sync>All Events

  • How can you "share" 1 common TNSNAMES.ORA file amngst many clients?

    We're installing into a large enterprise, and have the rqmt of installing 8.1.7 client locally, yet sharing a common network copy of TNSNAMES.ORA. Has anyone ever done this? Better yet, the question might ought to be what is the proper approach here? Local client is necessary for compatibility reasons.
    Thanks!

    Hi
    Oracle provides a "DNS" type of service called ORACLE NAMES SERVERS.
    This means that if the NAMES_DIRECTORY_PATH parameter in the sqlnet.ora file
    has a value of OSNAMES, then the client automatically uses DDO ..
    Dynamic Discovery Option to resolve then Oracle Name.
    I recommend that you read up on this point ....
    Regards
    Ade

  • How to add DNS entry Post Installation in Solaris 10?

    Hi, I have installed Solaris 10 without mentioning the DNS entry while installation. How do I add that now in order to make that Solaris 10 to get connected to Internet ?
    Thanks in Advance.
    Girish Prabhakara.

    Solaris 10 changed the way that some things work regarding networking, but this should still work.
    1. Change the hosts: line in /etc/nsswitch.conf to include dns.
    For example, change:
    hosts files
    to
    hosts files dns
    2. Create /etc/nsswitch.conf with the IP addresses of your DNS servers:
    Example:
    nameserver 192.168.1.100
    nameserver 192.168.2.100
    3. kill -HUP 1
    4. Run nslookup or ping another server via host name (not IP address) to determine if the system is properly communicating with your DNS servers.

  • How to add blank entry in PickListSearchConstraint?

    Hi MDM API experts,
    I and trying to add Pick List Search Constraint and want to include the blank entry also in the criteria. how to include this ?
    I have added NullSearchConstraint, but still does not return blank values. Please help.
    Thanks,
    Deepak

    Hi Sudhanshu,
    I think I have found the solution. For the benefit of others, let me explain the situation and the solution,
    Situation:
    I needed to perform search on table1 which looks like this,
    table1
    --- filed1 (lookuptable1)
    lookuptable
    --- lookupfiled1
    lookupfiled1 contains items ("allowedvalue1", "allowedvalue2", "allowedvalue3","allowedvalue4", "unallowedvalue1","unallowedvalue2"). 
    Default value is empty / blank / null.
    So in my PickListSearchConstraint I was adding the allowedvalues (which was working fine) but I must also
    include the default entry. This is where I was having issue.
    My Solution:
    Very Simple, I have added NullValue to the PickListSearchConstraint. Here is my method:
    private void addPickListSearchConstraint(Search search, String tableName,
                   String fieldName, int[] filterValue, boolean addNullValue){
         //field id
         FieldId filedid = null;
         try {
              filedid = getFieldId(tableName, fieldName);
         } catch (ConnectionException e2) {
              e2.printStackTrace();
         } catch (CommandException e2) {
              e2.printStackTrace();
         // Values     
         int valuesLength = filterValue.length;
         MdmValue[] mdmValues = null;
         if (addNullValue){
              mdmValues = new MdmValue[valuesLength + 1];
         } else {
              mdmValues = new MdmValue[valuesLength];
         for (int i = 0; i < filterValue.length; i++) {
              mdmValues<i> = new LookupValue(new RecordId(filterValue<i>));
         if (addNullValue){ //Add Null Value also in the PickListSearchConstraint
              mdmValues[valuesLength] = NullValue.NULL;
         // Add value constaint
         if (mdmValues != null) {
              PickListSearchConstraint tscMainTypeRoot =
                        new PickListSearchConstraint(mdmValues);
              if (filedid != null){
                   //Create a FieldSearchDimension for the entered field
                   FieldSearchDimension fsdMaintableType =
                        new FieldSearchDimension(filedid);
                   search.addSearchItem(fsdMaintableType, tscMainTypeRoot);
    If someone has a better approach then please let me know.
    Regards,
    Deepak

Maybe you are looking for

  • Sender filename in receiver payload without using mapping.

    hi Experts, I have a File to RFC scenario. wherein i need to pass source filename and filepath as parameter to RFC whenever file arrives at source directory. I am not using IR contents. What could be the simplest way to achieve this. One way ofcourse

  • Business partner replication using ABAP proxy

    Hello, I want to send vendor master data records from the MDM to SAP SRM. There is a standard ABAP proxy interface in the SRM for this purpose and this proxy is also being used by the standard PI content for MDM. Do you have any experience with this

  • When opening Muse it tells me the subscription has expired.

    I have recently changes the login details for a old member of staff to a new one, through the teams control panel. Muse will not open despite all payments are up to date.

  • Unable to "export using quicktime conversion" getting "General Error"

    When trying to export 720p sequences using "export using quicktime conversion," -> to H.264, pro res 422 H, Pro Res 4444, anything... The export bar goes all the way to 100% then I get a "General Error" Message. I have a Matrox HD card and here are m

  • Subject  transparent  w/Blue  Screen  ??

    I've been using Adobe CS5 now for a few months, and, of course, there is a lot still to learn. When doing blue-screen compositing, I have tried several exposure techniques on the screen;  over exposing one stop, underexposing one stop, and exposing i