Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Could not find or compile MSSQL.DDR

Could not find or compile MSSQL.DDR

Scheduled Pinned Locked Moved Support
6 Posts 3 Posters 17.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    M
    multix
    wrote on last edited by
    #1

    Hi. I am trying to use mssql.ddr for run query in an other mssql database, but can't find mssql.ddr in my installation.
    I am using centos 7 and tried to reinstall with --with-mssql prefix, but I could not do.
    When I try to configure with "--with-mssql", system says :

    configure: WARNING: unrecognized options: --with-mssql

    Where am I wrong or what must I do?

    On the other hand, I tried to compile with --with-odbc prefix, (installed unixODBC):
    there is not any error while configuring. but, when I try to use make command, I am getting this error :

    In file included from odbc.cpp:23:0:
    odbcdrv.h:77:17: fatal error: sql.h: No such file or directory
    Ā #include <sql.h>

    So, I could not use odbc.ddr, too.

    1 Reply Last reply
    0
    • A
      A
      Alex Kirhenshtein
      wrote on last edited by
      #2

      Native MSSQL driver is windows only, you'll have to use unixODBC.

      Install unixODBC-devel package to fix this error.

      1 Reply Last reply
      0
      • M
        M
        multix
        wrote on last edited by
        #3

        can you give me a sample odbc config for nxagent please. I could not make a config for odbc to run a query for mssql

        1 Reply Last reply
        0
        • M
          M
          multix
          wrote on last edited by
          #4

          ok, I am able to connect to MSSQL with odbc.ddr now.

          I have one more step to finish šŸ™‚

          when I create a DCI as DB.Query(dbid,query), nxagent says me :
          SQL query failed (Query = "onlineuser"): Could not find stored procedure 'online user'.

          but when I create a DCIS as DB.QueryResult(name), then everything is ok. I can get result my query.

          In first situation, must QUERY be a stored procedure, or am I making something wrong?

          thanks.

          1 Reply Last reply
          0
          • V
            V
            Victor Kirhenshtein
            wrote on last edited by
            #5

            Hi,

            in DB.Query you specify actual SQL query to be executed, like this:

            DB.Query(dbid,"SELECT col FROM my_table")

            If you specify query in agent's config then it is executed in background and DB.QueryResult returns cached result from last run. Pre-configured queries are good when you have long-running query - if you use it directly server request may fail on timeout. If you have simple query that executes in less than a second you can use DB.Query.

            Best regards,
            Victor

            1 Reply Last reply
            0
            • M
              M
              multix
              wrote on last edited by
              #6

              Thank you. It's solved now šŸ™‚

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better šŸ’—

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups