none
Linked Server to SAP HANA in SQL Server with or without Transact-SQL RRS feed

  • Question

  • Hi,
    How to set up and troubleshoot a linked server to an SAP HANA database in SQL Server.

    I found this link to achieve it for Oracle and Sybase, but I find nothing to SAP HANA:

    http://support.microsoft.com/kb/242025
    http://support.microsoft.com/kb/280102
    http://support.microsoft.com/kb/280106/en-us

    My script:

     

    exec sp_addlinkedserver @server = 'HANADEV' ,
    @srvproduct = 'Hana',
    @provider = 'SAPNewDBMDXProvider',
    @provstr = 'Provider=SAPNewDBMDXProvider;Srvr=hanadev,30015;Catalog=PUBLIC;User Id=user;Password=password;'

    exec sp_addlinkedsrvlogin 
    @useself = 'FALSE', 
    @rmtsrvname = 'HANADEV',
    @rmtuser = 'user',
    @rmtpassword = 'password'

    exec sp_linkedservers

    exec sp_tables_ex 'HANADEV'

    The SQL error:

    El proveedor OLE DB "SAPNewDBMDXProvider" para el servidor vinculado "HANA" devolvió el mensaje "Connection to database failed.Connection failed (RTE:[89006] System call 'connect' failed, rc=10061:No se puede establecer una conexión ya que el equipo de destino denegó expresamente dicha conexión)".
    Mens 7399, Nivel 16, Estado 1, Procedimiento sp_tables_ex, Línea 41
    El proveedor OLE DB "SAPNewDBMDXProvider" para el servidor vinculado "HANA" informó de un error. Error de autenticación.
    Mens 7303, Nivel 16, Estado 1, Procedimiento sp_tables_ex, Línea 41
    No se puede inicializar el objeto de origen de datos del proveedor OLE DB "SAPNewDBMDXProvider" para el servidor vinculado "HANADEV".

    Best regards,

    Monday, November 25, 2013 9:28 PM

Answers

  • Have you tried checking your connection details (userName and password and others)using a udl file or from odbc connection manager.

    It looks like authentication error.


    Vinay Valeti| If you think my suggestion is useful, please rate it as helpful. If it has helped you to resolve the problem, please Mark it as Answer

    Monday, November 25, 2013 9:57 PM

All replies

  • Have you tried checking your connection details (userName and password and others)using a udl file or from odbc connection manager.

    It looks like authentication error.


    Vinay Valeti| If you think my suggestion is useful, please rate it as helpful. If it has helped you to resolve the problem, please Mark it as Answer

    Monday, November 25, 2013 9:57 PM
  • The problem is using the MDX provider. You need to use the 64 bit ODBC provider. Check out the video https://www.youtube.com/watch?v=HCVlHcEAiys on how to connect and run queries. Regards, Bill
    • Proposed as answer by Bill Ramos Tuesday, March 1, 2016 2:57 AM
    Tuesday, March 1, 2016 2:57 AM