This discussion is archived
1 2 Previous Next 17 Replies Latest reply: Dec 7, 2012 11:07 AM by Michael Ferrante (Oracle) RSS

ora-12560 tns protocol adapter error

newbi_egy Explorer
Currently Being Moderated
hi all ,
ora-12560 tns protocol adapter error

always asks for username and password every time i run my form
how to get rid of it ?

thanks
  • 1. Re: ora-12560 tns protocol adapter error
    Michael Ferrante (Oracle) Guru Moderator
    Currently Being Moderated
    I recommend that you start here:

    http://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo

    Also, you are asking two unrelated questions. One relates to a tns error and the other is how to avoid the need to enter uname and passwords.

    The tns failure is likely the result of an incorrect or missing entry in tnsnames.ora used by Forms. Because you did not mention the details about the version or platform you are using, I can't offer much more for this.

    As for avoiding the uname and password prompt, this can be done in several ways, but again without your specific version and platform details, I can't offer too much. For newer versions you can use SSO. You can also hard code a username and password in formsweb.cfg. I don't recmomend this because the entry would be in plain text and could create a security issue. You can also pass the username and password into the runtime (URL for web deployed).

    Example: userid=scott/tiger@orcl
  • 2. Re: ora-12560 tns protocol adapter error
    newbi_egy Explorer
    Currently Being Moderated
    thanks a lot for your interest
    i am using database 10grel2 and developer suite 10grel2 as well .

    you said that i can put scott/tiger@orcl in the runtime .
    i think you mean edit>preferences>runtime > application server url ? do you want me to remove
    this url and put scott/tiger like you mentioned ?

    thanks
  • 3. Re: ora-12560 tns protocol adapter error
    Michael Ferrante (Oracle) Guru Moderator
    Currently Being Moderated
    If you properly log into a db from the Forms Builder (File > Connect...) then run your form from the Builder using the "Run Form" button on the toolbar, the form will launch with the username and password included in the URL. Keep in mind that you may not actually see this information in the url because it has been masked for security purposes. This security feature can be disable, but I will hold that for another topic.

    Your Application Server URL on the Runtime Preferences, but appear as a proper url to the Forms servlet. For example:

    http://localhost:8890/forms/frmservlet

    You must also ensure that the Web Browser Location field is properly entered.

    If you want to manually run your form (from a browser) and want to avoid entering the uname and password, you can either include it in the URL or add it to formsweb.cfg. For example, a browser url would appear something like this:

    http://localhost:8890/forms/frmservlet?form=myForm&userid=scott/tiger@orcl

    Alternatively, you can add it to formsweb.cfg. Open this config file and look for "userid=". If you do not have one, add one. If you do have one, simply add the username and password info you desire. For example:

    userid=scott/tiger@orcl

    As I mentioned, adding this value to the url or config file does present a security risk as this information remains in plain text and can be seen in the network traffic.
  • 4. Re: ora-12560 tns protocol adapter error
    newbi_egy Explorer
    Currently Being Moderated
    hi ,
    i've tried the two solutions you've mentioned ,

    the first one resulted in "can not read form myform" .

    the second resulted in the same message "tns protocol adapter error" .

    please explain this as a temporary solution . but please tell me what is the reason for this error to appear , normally
    it does not appear , why it appears with me , is there something wrong with my installation or other ?


    thanks a lot
  • 5. Re: ora-12560 tns protocol adapter error
    Michael Ferrante (Oracle) Guru Moderator
    Currently Being Moderated
    There are two problems.

    First, the "Cannot read form" is likely the result of the form not being found. Meaning, you saved the form in a directory not included in FORMS_PATH. This value is set in default.env. Alternatively, you can incude the path in the URL. For example,

    http://localhost:8890/forms/frmservlet?form=C:\mydirectory\myForm&userid=scott/tiger@orcl

    Second, the protocol adapter error is the result of what I originally said, which is a misconfigured tnsmanes.ora. Go into your db home and locate the directory \network\admin and open tnsnames.ora in a text editor. Find the information about the connection you want to make. For example ORCL and copy that info to the clipboard or a Notepad session. Then open the same file found in your Forms/Reports home and paste the entry in and save the changes. The entry will be similar, but not exactly the same as this:
    ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.10)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = ORCL)
        )
      )
    Retest
  • 6. Re: ora-12560 tns protocol adapter error
    newbi_egy Explorer
    Currently Being Moderated
    it worked when i added the path to the url in the runtime tab .

    the second part , about repairing tnsnames.ora , i did what you said but without a vain .

    i went to tnsnames.ora in my database home like you said and copied this ,

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = semsem-pc)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )

    then i went to devsuitehome>network>admin>tnsnames.ora , then opened and found the same words , but not exactly the same , i think it was the same but "semsem-pc" in the third line , it was localhost ,
    i removed that part , and pasted the above in place of it .

    and it is not working , the same error appears "tns protocol adapter error...." .

    i am waiting for your response with my appreciation

    thanks
  • 7. Re: ora-12560 tns protocol adapter error
    Michael Ferrante (Oracle) Guru Moderator
    Currently Being Moderated
    Try changing the hostname to the actual IP address.
  • 8. Re: ora-12560 tns protocol adapter error
    newbi_egy Explorer
    Currently Being Moderated
    how can that be done ?
  • 9. Re: ora-12560 tns protocol adapter error
    Christian Erlinger Guru
    Currently Being Moderated
    Instead of semsem-pc write down your actual IP address?

    cheers
  • 10. Re: ora-12560 tns protocol adapter error
    newbi_egy Explorer
    Currently Being Moderated
    the problem here is that i do not have a static ip address , it changes .

    2- should i paste my ip instead of semsem-pc in the two files or in forms-reports file ?
  • 11. Re: ora-12560 tns protocol adapter error
    Michael Ferrante (Oracle) Guru Moderator
    Currently Being Moderated
    If the database is on the same machine with the Forms installation and you don't plan to have this accessed remotely, simply change the address in tnsnames.ora to localhost, which is 127.0.0.1. Althernatively, if you are on a Windows platform you can install the Windows loopback adpater. Do a Google search for info on how to do that.
  • 12. Re: ora-12560 tns protocol adapter error
    newbi_egy Explorer
    Currently Being Moderated
    this is the orcl part in my tnsnames.ora in db directory :

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = semsem-pc)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )




    and this is the part in my devsuitehome directory :


    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = orcl)
    )
    )



    what should i do , remove what exactly , and write what exactly instead of what ?

    i repeat , my ip is not static .

    thanks
  • 13. Re: ora-12560 tns protocol adapter error
    Michael Ferrante (Oracle) Guru Moderator
    Currently Being Moderated
    CHANGE:_

    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost )(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = orcl)
    )
    )


    TO:_

    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = *127.0.0.1* )(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = orcl)
    )
    )
  • 14. Re: ora-12560 tns protocol adapter error
    newbi_egy Explorer
    Currently Being Moderated
    it does not work , and the most important question now please ,

    i am facing very strange problems ,

    the tns error
    and the tns : could not resolve the connect identifier specified .

    the second error happened before because i did not set the local net service name configuration .
    but i did it after this , and it worked , and the error vanished , but now it appears again , in addition to the first error ,
    and it's solution that did not work .

    i'm using xp sp3 , can this sp be the reason for all these errors ?

    Edited by: semsem on Dec 5, 2012 2:47 PM
1 2 Previous Next

Legend

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