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. Database Upgrade Fails 3.8.366

Database Upgrade Fails 3.8.366

Scheduled Pinned Locked Moved Support
6 Posts 4 Posters 12.5k 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.
  • F
    F
    foxcomm
    wrote on last edited by
    #1

    We upgraded from NetXMS 3.8.314 to 3.8.366 (Under Windows 2019 Server using Microsoft SQL 2019) and the database upgrade is failing. nxdbmgr error below. Anyone have any ideas on how to proceed? Thanks

    E:\NetXMS\bin\nxdbmgr.exe -t upgrade
    NetXMS Database Manager Version 3.8.366 Build 3.8-366-gd7bdc676e2 (UNICODE)

    Upgrading database...
    Upgrading from version 38.16 to 38.17
    >>> ALTER TABLE alarms ADD rule_description varchar(255)
    >>> UPDATE alarms SET rule_description=(SELECT REPLACE(REPLACE(REPLACE(REPLACE(comments, ?, ' '), ?, ' '), ?, ' '), '  ', ' ') FROM event_policy WHERE event_policy.rule_guid=alarms.rule_guid)
    SQL query failed ([Microsoft][SQL Server Native Client 11.0][SQL Server]Argument data type text is invalid for argument 1 of replace function.):
    UPDATE alarms SET rule_description=(SELECT REPLACE(REPLACE(REPLACE(REPLACE(comments, ?, ' '), ?, ' '), ?, ' '), '  ', ' ') FROM event_policy WHERE event_policy.rule_guid=alarms.rule_guid)
    Rolling back last stage due to upgrade errors...
    Database upgrade failed
    >>> SELECT var_value FROM metadata WHERE var_name='PendingOnlineUpgrades'

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      This was addressed in Telegram, let's copy this info here:

      execute manually the following statements:
      ALTER TABLE alarms ADD rule_description varchar(255);
       (may file if alter was already done by nxdbmgr and didn't rolled back - that's ok then

      UPDATE metadata SET var_value='17' WHERE var_name='SchemaVersionMinor';

      server should start after that

      1 Reply Last reply
      0
      • J
        J
        jmcdole
        wrote on last edited by
        #3

        This is excellent.  Worked like a charm!

        Thank you!

        1 Reply Last reply
        0
        • F
          F
          foxcomm
          wrote on last edited by
          #4

          Filipp --

          Thanks for that. Worked great!

          1 Reply Last reply
          0
          • WoodyW
            WoodyW
            Woody
            wrote on last edited by
            #5

            I had the same problem, but after executing the satements it did work.

            1 Reply Last reply
            0
            • F
              F
              Filipp Sudanov
              wrote on last edited by
              #6

              This is now fixed in 3.8.382

              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