Home

Hana two Linqpad

edited December 2018
Hi, I was able to setup a connection between SAP Hana 2.0 and linqpad utilizing linq2db drivers. I'm also able to issue SQL queries against the database in linqpad but populating the left pane with tables/views etc. does not work. It seems to kinda hang and never extends. Anyone knows this issue and was able to resolve it?

Best, Mario

Comments

  • You need to disable procedures population, because it is very slow for HANA and could rise assertions from HANA provider. Probably we will disable proplematic procedures population for next linqpad linq2db integration to make it work better.
  • edited December 2018
    This behavior doesn't change for me even with procedure/function population turned off. Probably this is due to the size of our hana database - we are around ~4k Tables and probably twice as much views.

    Anyhow even when I add a schema to the connection definition with way less tables (around 20) populating hangs...
  • edited December 2018
    I see following options:
    - it is really too much tables - then you just need to wait
    - you use old linq2db integration (less than 2.5.2), which had issue with procedure population checkbox not working properly

    Also it is possible that linqpad tree cannot handle so many entries

    If you can attach with debugger to linqpad process and check where it stuck - it will be more clear what is going on
  • edited December 2018
    So I've waited (more than 20mins) and finally linqpad was populated. I've than tried to issue my first query against a well known table - this is what happened:

    prd_global_ecc_CV_MARA.Take(100)
    HanaException: sql syntax error: incorrect syntax near ".": line 250 col 27 (at pos 4556)

    Having a look at the SQL Statement reveals the following:

    -- SapHana
    SELECT
    "t1"."MANDT",
    ....
    FROM
    "_SYS_BIC"."prd"."global"."ecc/CV_MARA" "t1"
    LIMIT 100


    Manually "tuned" query:


    -- SapHana
    SELECT
    "t1"."MANDT",
    ...
    FROM
    "_SYS_BIC"."prd.global.ecc/CV_MARA" "t1"
    LIMIT 100


    The package from the view isn't translated correctly into the sql statement.
  • edited December 2018
    We plan to release new version of linq2db integration in a week. Will try to fix it there. You can track it here: https://github.com/linq2db/linq2db/issues/1462
  • edited December 2018
    You can try new version from here with fix for identifier names: https://ci.appveyor.com/project/igor-tkachev/linq2db-linqpad/build/artifacts

    it is not yet released officially as we wait for DB2 3rd party provider update
  • Thank you Dluk, works like a charm!
Sign In or Register to comment.