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. SQL query failed

SQL query failed

Scheduled Pinned Locked Moved Support
7 Posts 3 Posters 29.2k 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.
  • K
    K
    Khushik
    wrote on last edited by
    #1

    Hello,

    I want to install NetXMS 2.0 on Windows machine with remote SQL server Standard 2005, but I got the following error(see attachment). Could you please tell me what was done wrong?


    netxms1.JPG

    nmetxms2.JPG

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

      Check this database (netxms_db) for existing tables. Did you run wizard more than once?

      1 Reply Last reply
      0
      • K
        K
        Khushik
        wrote on last edited by
        #3

        Thank you for the quick reply.

        I have recreated the DB, but now I get the following error:


        netxms3.JPG

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

          That's a bug. Filtered indexes (with "WHERE ..." clause) are introduced in SQL Sever 2008.

          https://dev.raden.solutions/issues/747

          As a workaround - uncheck "initialise database", edit file C:\NetXMS\lib\sql\dbinit_mssql.sql: remove "WHERE ..." part from this "CREATE INDEX" and initialise database by hand:

          1. open "cmd" window
          2. cd c:\netxms\bin
          3. nxdbmgr init C:\NetXMS\lib\sql\dbinit_mssql.sql
          4. net start "NetXMS Core"
          1 Reply Last reply
          0
          • K
            K
            Khushik
            wrote on last edited by
            #5

            I have done the instantiation successful. Now when I want to start the service - I got the following error:
            [22-Jan-2015 01:02:23.114] Log file opened
            [22-Jan-2015 01:02:23.122] [INFO ] Database driver "mssql.ddr" loaded and initialized successfully
            [22-Jan-2015 01:02:23.541] [ERROR] SQL query failed (Query = "CREATE TABLE idata_100 (item_id integer not null,idata_timestamp integer not null,idata_value varchar(255) null)"): [Microsoft][SQL Server Native Client 10.0][SQL Server]There is already an object named 'idata_100' in the database.
            [22-Jan-2015 01:02:23.542] [ERROR] SQL query failed (Query = "CREATE CLUSTERED INDEX idx_idata_100_id_timestamp ON idata_100(item_id,idata_timestamp)"): [Microsoft][SQL Server Native Client 10.0][SQL Server]The operation failed because an index or statistics with name 'idx_idata_100_id_timestamp' already exists on table 'idata_100'.
            [22-Jan-2015 01:02:23.548] [ERROR] SQL query failed (Query = "CREATE TABLE tdata_100 (item_id integer not null,tdata_timestamp integer not null,record_id bigint not null,UNIQUE(record_id))"): [Microsoft][SQL Server Native Client 10.0][SQL Server]There is already an object named 'tdata_100' in the database.
            [22-Jan-2015 01:02:23.549] [ERROR] SQL query failed (Query = "CREATE TABLE tdata_records_100 (record_id bigint not null,row_id bigint not null,instance varchar(255) null,PRIMARY KEY(row_id),FOREIGN KEY (record_id) REFERENCES tdata_100(record_id) ON DELETE CASCADE)"): [Microsoft][SQL Server Native Client 10.0][SQL Server]There is already an object named 'tdata_records_100' in the database.
            [22-Jan-2015 01:02:23.550] [ERROR] SQL query failed (Query = "CREATE TABLE tdata_rows_100 (row_id bigint not null,column_id integer not null,value varchar(255) null,PRIMARY KEY(row_id,column_id),FOREIGN KEY (row_id) REFERENCES tdata_records_100(row_id) ON DELETE CASCADE)"): [Microsoft][SQL Server Native Client 10.0][SQL Server]There is already an object named 'tdata_rows_100' in the database.
            [22-Jan-2015 01:02:23.556] [ERROR] SQL query failed (Query = "CREATE CLUSTERED INDEX idx_tdata_100_id_timestamp ON tdata_100(item_id,tdata_timestamp)"): [Microsoft][SQL Server Native Client 10.0][SQL Server]The operation failed because an index or statistics with name 'idx_tdata_100_id_timestamp' already exists on table 'tdata_100'.
            [22-Jan-2015 01:02:23.558] [ERROR] SQL query failed (Query = "CREATE INDEX idx_tdata_rec_100_instance ON tdata_records_100(instance)"): [Microsoft][SQL Server Native Client 10.0][SQL Server]The operation failed because an index or statistics with name 'idx_tdata_rec_100_instance' already exists on table 'tdata_records_100'.
            [22-Jan-2015 01:02:23.559] [ERROR] SQL query failed (Query = "CREATE INDEX idx_tdata_rec_100_id ON tdata_records_100(record_id)"): [Microsoft][SQL Server Native Client 10.0][SQL Server]The operation failed because an index or statistics with name 'idx_tdata_rec_100_id' already exists on table 'tdata_records_100'.
            [22-Jan-2015 01:02:24.062] [INFO ] Listening for SNMP traps on UDP socket 0.0.0.0:162
            [22-Jan-2015 01:02:24.065] [INFO ] Listening for client connections on TCP socket 0.0.0.0:4701
            [22-Jan-2015 01:02:24.065] [INFO ] Listening for client connections on TCP socket :::4701
            [22-Jan-2015 01:02:24.065] [INFO ] NetXMS Server started
            [22-Jan-2015 01:02:24.065] [INFO ] NetXMS Server stopped
            [22-Jan-2015 01:02:24.065] [INFO ] Listening for mobile device connections on TCP socket 0.0.0.0:4747
            [22-Jan-2015 01:02:24.065] [INFO ] Listening for mobile device connections on TCP socket :::4747

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

              Hi,

              you can safely ignores these errors - it just tries to re-create tables that are already exist. Normally it shouldn't happen though. Watch if there will be any other SQL errors.

              Best regards,
              Victor

              1 Reply Last reply
              0
              • K
                K
                Khushik
                wrote on last edited by
                #7

                Thank you very much. Finally I have done it.

                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