1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

ORA - 12560 TNS: Protocol Adaptor error

Discussion in 'Server Administration and Options' started by Angappan, Aug 10, 2009.

  1. Angappan

    Angappan Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    80
    I am trying to connect oracle 10g from my local machine to MSSQL from different host. I am getting this errors.

    resource:ww.dbasupport.com/oracle/ora10g/connection02.shtml

    LSNRCTL> start LISTENERSQL_SERVER
    Starting tnslsnr: please wait...

    TNS-12560: TNS: protocol adapter error
    TNS-00530: Protocol adapter error

    H:\>tnsping SQL_SERVER

    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 10-AUG-2009 16:27:38

    Copyright (c) 1997, 2005, Oracle. All rights reserved.

    Used parameter files:
    D:\oracledb\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora


    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL=tcp)(HOST=wks178)(PORT=1433)) (CONNECT_DATA = (SID=OAS
    IS2)) (HS=OK))
    TNS-12537: TNS:connection closed

    H:\>

    Can you tell me, how to solve this problem.

    thanks
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,346
    Likes Received:
    347
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Re: TNS-12560: TNS:protocol adapter error

    Not until we see how you have configured LISTENERSQL_SERVER in the listener.ora file.
     
  3. Angappan

    Angappan Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    80
    Re: TNS-12560: TNS:protocol adapter error

    hi,

    dbasupport.com/oracle/ora10g/connection02.shtml

    I using oracle10XE with MSSQL 2005.

    I tried with oracle to non-oracle database. I created a dsn for a sqlserver named as SQLSERVER. I created one initsqlserver.ora in oracle_home/hs/admin/
    and then, i altered listener.ora
    LISTENERSQLSERVER =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=10.1.4.107)(PORT=1433))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))

    SID_LIST_LISTENERSQLSERVER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=SQLSERVER)
    (ORACLE_HOME = d:\oracle\product\10.1.0\db_1)
    (PROGRAM=hsodbc)
    )
    )

    and i altered in the tnsnames.ora

    SQLSERVER =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=10.1.4.107)(PORT=1433))
    (CONNECT_DATA=(SID=SQLSERVER))
    (HS=OK)
    )


    kindly tell me, how to use oracle with non-oracle databases at different host.

    thanks
    Angappan
     
  4. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,346
    Likes Received:
    347
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Re: TNS-12560: TNS:protocol adapter error

    You need to read here:

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/tgvsgc.htm#HETER002
     
  5. Angappan

    Angappan Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    80
    Re: TNS-12560: TNS:protocol adapter error

    hi,

    thank you very much for your reply.

    The link specified mentions about the conceptual area of oracle heterogeneous. May I know the samples to check with the oracle to non-oracle databases configuration.

    thanks
    Angappan
     
  6. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,346
    Likes Received:
    347
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Re: TNS-12560: TNS:protocol adapter error

    Had you scrolled two pages further you'd have found this:

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/admin.htm
     
  7. Angappan

    Angappan Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    80
    Re: TNS-12560: TNS:protocol adapter error

    hi,

    I tried with links provided to me, I am getting the same problem


    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error

    kindly tell here, what can I do to rectify this one.

    thanks
     
  8. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,346
    Likes Received:
    347
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Re: TNS-12560: TNS:protocol adapter error

    Use a version of Oracle which supporte heterogeneous services. XE does not. I did not notice you are using XE until this last post, and that was my mistake.
     
  9. Angappan

    Angappan Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    80
    Re: TNS-12560: TNS:protocol adapter error

    Hi,

    Its okay. Its not your mistake,its all in the game. I will try it now and I update you.

    thanks
     
  10. Angappan

    Angappan Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    80
    Re: TNS-12560: TNS:protocol adapter error

    Hi,


    I tried with regular Oracle 10g server, i can able to start the listener. I have a doubt on the listener, here we have to give the actual current database (oracle) host and port no in the listener.ora
    If we given different hostname and different port no means ( error : unknown host or object).
    The dsn will point out the sqlserver at host and port. right?

    I have created database link.

    create database link db_link connect to sa identified by "mss@delhi" using 'sql_server';

    Then database link is created. But i can't able to access the tables, even sysdate.
    I think there will be some grant privlieages.
    how can I make the sqlserver to grant the privilieages to my oracle server

    normally we can use grant for a schema.

    grant all on tablename to schema_name;

    here.

    grant all on tablename to [host][sid][database][schema];

    or by creating database link.

    create database link db_link connect to sa identified by "mss@delhi" authenticated by oracle_user identified by password using 'sql_server';

    how tell me the ideas.


    thanks
     
  11. Angappan

    Angappan Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    80
    Re: TNS-12560: TNS:protocol adapter error

    Hi,

    I have a doubt, that I created a new listener for sqlserver on different host machine, I created the listener with same localhost and same port for oracle server in the oracle server with the dsn name where i created in the sqlserver. Likewise same thing in the tnsnames.ora, i have a doubt that how the dsn at different host will be accessed here. Then, i have a doubt how the grant privelages to be given at the sqlserver that the oracle database at different host through dsn.


    Kindly tell me the ideas over here.its urgent.

    Thanks
     
  12. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,346
    Likes Received:
    347
    Trophy Points:
    1,430
    Location:
    Aurora, CO
  13. Angappan

    Angappan Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    80
    Re: TNS-12560: TNS:protocol adapter error

    Hi

    Thank you all for your kind support.

    I tried with Oracle 10g with transparent gateway and gateway for MSSQL.
    I followed the configurations
    http://www.oracle86.com/doc_10g/gateways.102/b14270/ch2.htm#i1005724

    I facing some a error on TNS naming.

    I configured the listener in gateway and I pointed the tns in server to the gateway.I mentioned the server.dbname in gateway tg4msql.

    kindly tell me, where I have to focus, and guide me.

    here i am using tg4msql as default gateway, how can I use my own gateway.

    thanks
     
  14. anwar419

    anwar419 Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    Re: TNS-12560: TNS:protocol adapter error

    hi this is mohd.anwar from hyderabad india.i am a oracle dba and updating to oracle apps dba.plz my seniors let me practical steps to adadmin,cloning.performance tuning
     
  15. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    Re: TNS-12560: TNS:protocol adapter error

    Isn't this the wrong thread my friend, and shouldn't you read the manuals first? and shouldn't you ask more specific questions?

    :)
     
  16. vkselvaa

    vkselvaa Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    couldn't set the EZCONNECT Setup and TNSNAMES Setup.
    becas the file refered in the setup instruction not in my system.
    what will do the correct flow to access the oracle data.

    i install the following oracle db in my system.

    1] Oracle Database 10g Express Edition.
    2] Oracle - OraClient11g_home1.
    3] ODAC112021Xcopy_x64.
    4] ODAC10203x64. i extract this file. but i couldn't install the setup file.
    [5:02:42 PM] selvaa v: ORA-12521: TNS:listener does not currently know of instance requested in connect descriptor
    [5:02:55 PM] selvaa v: couldn't set the EZCONNECT Setup and TNSNAMES Setup.
    becas the file refered in the setup instruction not in my system.
    what will do the correct flow to access the oracle data.

    i install the following oracle db in my system.

    1] Oracle Database 10g Express Edition.
    2] Oracle - OraClient11g_home1.
    3] ODAC112021Xcopy_x64.
    4] ODAC10203x64. i extract this file. but i couldn't install the setup file.


    this is my application script:

    I refer only the oracle.web and coulldn't refer the oracle.dataaccess.dll because it is not displayed in the list.

    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;

    namespace OraWinApp
    {
    public partial class Form1 : Form
    {

    public Form1()
    {
    InitializeComponent();
    }


    private void Form1_Load(object sender, EventArgs e)
    {

    }

    private void button1_Click(object sender, EventArgs e)
    {

    try
    {

    string oradb = "Data Source=192.168.1.35//ORCL;";
    OracleConnection conn = new OracleConnection(oradb); // C#
    conn.Open();
    OracleCommand cmd = new OracleCommand();
    cmd.Connection = conn;
    cmd.CommandText = "select employee_id from employees where first_name = 'steven'";
    cmd.CommandType = CommandType.Text;
    OracleDataReader dr = cmd.ExecuteReader();
    dr.Read();
    label1.Text = dr.GetString(0);
    conn.Dispose();
    }

    catch (System.Exception ee)
    {

    textBox1.Text = ee.Message;
    }

    }
    }
    }


    when i build the program ORA-12521: TNS:listener does not currently know of instance requested in connect descriptor is displayed..

    anybody clarify this forum step by step...