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. Migrating fails

Migrating fails

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 22.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.
  • E
    E
    Egert143
    wrote on last edited by
    #1

    Hello

    Any tips how to solve following error message, i get it when trying to migrate from MSSQL to Postgresql?

    Migrating table snmp_ports
    SQL query failed (23505 ERROR:  duplicate key value violates unique constraint "
    snmp_ports_pkey"
    DETAIL:  Key (id)=(1) already exists.):
    INSERT INTO snmp_ports (id,port,zone) VALUES (?,?,?)
    Failed input record:
      id = "1"
      port = "161"
      zone = "0"
    Database migration failed.

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

      Hi,

      looks like wrong primary key was set during PostgreSQL DB init. What NetXMS version you are using?

      Best regards,
      Victor

      1 Reply Last reply
      0
      • E
        E
        Egert143
        wrote on last edited by
        #3

        Hello

        Version is latest. I got it fixed by removing records from snmp_ports tabel. There were two records, both with id 1. After migration completed i re added settings with netxms.

        Egert

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

          It was caused by a bug in DB init script (wrong primary key). We have fixed it, fix will be included into next patch release.

          Best regards,
          Victor

          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