6 Replies Latest reply on Apr 2, 2015 10:51 AM by juniordev

    View or function 'dbo.Nodes' is not updatable

    juniordev

      Hi,

      When I add a node via SWIS, got error like above. NPM version is 11.5. I think this is related to version upgrade. Can you help me about that error?

       

      ERROR Create - Error executing create operation: View or function 'dbo.Nodes' is not updatable because the modification affects multiple base tables.

      Orion.Nodes

      EntityType: Orion.Nodes

      IPAddress: <some_ip>

      Caption: <just_caption>

      SysName: <just_caption>

      DynamicIP: False

      EngineID: 4

      Status: 1

      Allow64BitCounters: True

      ObjectSubType: SNMP

      SysObjectID:

      MachineType:

      VendorIcon:

      Community: modbtup

      SNMPVersion: 2

      MemoryUsed: -1

      CPULoad: -1

      PercentMemoryUsed: -1

      Contact:

      Location:

      DNS:

      IOSImage:

      IOSVersion:

        • Re: View or function 'dbo.Nodes' is not updatable
          Jan Pelousek

          Hello, can you, please, paste here also the part where you're creating the Orion.Nodes object? dbo.Nodes became a View in NPM 11.5 (before it was table), but that should be handled within the CRUD operation.

           

          Regards,

          H.

            • Re: View or function 'dbo.Nodes' is not updatable
              juniordev

              The CRUD operation code block is at general DLL which is used already before like creating/updating nodes etc.

               

              The property bag values are

               

                                          Objs.PropBag_Node pbNode = new Objs.PropBag_Node();

                                          pbNode.Allow64BitCounters = true;

                                          pbNode.Caption = oNode.Caption;

                                          pbNode.City = dr["CITY"].ToString();

                                          pbNode.Contact = "";

                                          pbNode.CPULoad = -2;

                                          pbNode.Community = ConfigurationManager.AppSettings["atmCommunity"].ToString();

                                          pbNode.DynamicIP = false;

                                          pbNode.Department = "";

                                          pbNode.EngineID = _engineID;

                                          pbNode.EntityType = "Orion.Nodes";

                                          pbNode.IPAddress = oNode.IP_Address;

                                          pbNode.Location = "";

                                          pbNode.MachineType = "";

                                          pbNode.MemoryUsed = -2;

                                          pbNode.ObjectSubType = "SNMP";

                                          pbNode.PercentMemoryUsed = -2;

                                          pbNode.SNMPVersion = 2;

                                          pbNode.Status = 1;

                                          pbNode.SysName = oNode.Caption;

                                          pbNode.SysObjectID = "";

                                          pbNode.VendorIcon = "";

               

               

              And the crud method is

               

                              string uri = swis.Create("Orion.Nodes", new PropertyBag

                                                                    {

                                                                        {"EntityType", "Orion.Nodes"},

                                                                        {"IPAddress", pb.IPAddress},

                                                                        {"Caption", pb.Caption},

                                                                        {"SysName", pb.SysName},

                                                                        {"DynamicIP", pb.DynamicIP},

                                                                        {"EngineID", pb.EngineID},

                                                                        {"Status", pb.Status},

                                                                        {"Allow64BitCounters", pb.Allow64BitCounters},

                                                                        {"ObjectSubType", pb.ObjectSubType},

                                                                        {"SysObjectID", pb.SysObjectID},

                                                                        {"MachineType", pb.MachineType},

                                                                        {"VendorIcon", pb.VendorIcon},

                                                                        {"Community", pb.Community},

                                                                        {"SNMPVersion", pb.SNMPVersion},

                                                                        {"MemoryUsed", pb.MemoryUsed},

                                                                        {"CPULoad", pb.CPULoad},

                                                                        {"PercentMemoryUsed", pb.PercentMemoryUsed},

                                                                        {"Contact", pb.Contact},

                                                                        {"Location", pb.Location},

                                                                        //{"City", pb.City},

                                                                        {"DNS", ""},

                                                                        //{"Department", pb.Department},

                                                                        //{"Comments", ""},

                                                                        {"IOSImage", ""},

                                                                        {"IOSVersion", ""}

                                                                    });