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. NetXMS upgrade to v1.2.5 MSSQL database upgrade issue

NetXMS upgrade to v1.2.5 MSSQL database upgrade issue

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 11.3k 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.
  • B
    B
    bdefloo
    wrote on last edited by
    #1

    Hi,

    Just for future reference of anyone having the same problems as we did upgrading to v1.2.5 on MS SQL 2008. We upgraded from v1.2.4 on a 32bit Windows 2003 server. When upgrading the database I got the following error:

    C:\NetXMS\bin>nxdbmgr.exe upgrade
    NetXMS Database Manager Version 1.2.5
    
    Upgrading database...
    Upgrading from version 265 to 266
    SQL query failed ([Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot c
    reate index. Object 'event_log' was created with the following SET options off:
    'ANSI_NULLS'.):
    CREATE INDEX idx_event_log_root_id ON event_log(root_event_id) WHERE root_event_
    id > 0
    Rolling back last stage due to upgrade errors...
    Database upgrade failed
    

    Most likely, this was because we've been upgrading the same NetXMS instance since v1.0.13 or older. The only solution we found was to rename the event_log table, and to recreate it with ANSI_NULLS on:

    USE [netxms]
    GO
    
    /****** Object:  Table [netxms].[event_log]    Script Date: 01/11/2013 10:37:06 ******/
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    SET ANSI_PADDING OFF
    GO
    
    CREATE TABLE [netxms].[event_log](
    	[event_id] [bigint] NOT NULL,
    	[event_code] [int] NOT NULL,
    	[event_timestamp] [int] NOT NULL,
    	[event_source] [int] NOT NULL,
    	[event_severity] [int] NOT NULL,
    	[event_message] [varchar](255) NULL,
    	[root_event_id] [bigint] NOT NULL,
    	[user_tag] [varchar](63) NULL,
    PRIMARY KEY CLUSTERED
    (
    	[event_id] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    
    GO
    
    SET ANSI_PADDING OFF
    GO
    

    Probably you could then move all the data back to the new table, but we didn't really have any need for it so we just started with an empty table.

    Hope this helps anyone coming across the same issue.

    Kind regards,
    bdefloo

    1 Reply Last reply
    0
    • L
      L
      Lotan
      wrote on last edited by
      #2

      Thanks! It worked.

      Although, I had to change CREATE TABLE [netxms].[event_log] to CREATE TABLE [event_log] for it to work.

      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