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. Add Custom Objects Via SQL Script

Add Custom Objects Via SQL Script

Scheduled Pinned Locked Moved Support
5 Posts 3 Posters 37.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.
  • M
    M
    mclifford
    wrote on last edited by
    #1

    It is possible to add custom attributes via a TSQL Script?

    I am able to successfully add them to the correct object_id but, when I pull them in the gui I cannot see them.

    1 Reply Last reply
    0
    • M
      M
      mclifford
      wrote on last edited by
      #2

      I would like to add more detail to my post. I wrote the following sql statement. It completes successfully however when I pull up the custom properties of object_id 3367 it is blank in the GUI.

      Insert Into object_custom_attributes(object_id, attr_name, attr_value) Values (3367, 'AssetTag', '123456')

      1 Reply Last reply
      0
      • T
        T
        tomaskir
        wrote on last edited by
        #3

        When a client is connected, objects are cached client-side - so you wont see changed done directly in DB.
        Restarting the client should be enough.

        It might also be a good idea to do DB changed only when the server is off, then run nxdbmgr check, just to make sure database is still in a good health 🙂

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

          I found out I have to bounce the core service in order to view the values.

          Is there a better way to refresh?

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

            Hi,

            server caches object data in memory, so direct DB changes while server is working will not be picked up. You can use NetXMS API to modify object custom attributes (either Java API or Python scripts using nxshell).

            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