Author Topic: Finding an object by ID  (Read 2147 times)

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Finding an object by ID
« on: November 18, 2014, 05:44:07 pm »
Hi,

 I have an error in the database, when using the database manager nxdbmgr I get the following:

Checking database (excluding collected data):
* Checking zone objects...                                            [PASSED]
* Checking node objects...                                            [PASSED]
Missing interface object 13632 properties. Create? (Y/N) Y
SQL query failed (Field 'submap_id' doesn't have a default value):
INSERT INTO object_properties (object_id,guid,name,status,is_deleted,is_system,inherit_access_rights,last_modified,statu
s_calc_alg,status_prop_alg,status_fixed_val,status_shift,status_translation,status_single_threshold,status_thresholds,location_type,latitude,longitude,image) VALUES (13632,'5bdfa0bc-78d5-be40-94d6-6573531da91e','lost_interface_13632',5,0,0,
1,1416313630,0,0,0,0,0,0,'00000000',0,'0.000000','0.000000','00000000-0000-0000-0000-000000000000')
* Checking interface objects...                                       [ERROR ]
* Checking network service objects...                                 [PASSED]
* Checking cluster objects...                                         [PASSED]
* Checking template to node mapping...                                [PASSED]
* Checking object properties...                                       [PASSED]
* Checking event processing policy...                                 [PASSED]
* Checking network map links...                                       [PASSED]
* Checking data tables...                                             [PASSED]
1 errors was found, 0 errors was corrected
Database still contain errors
Database check completed

What is the best (easiest) way to find the name of object with ID = 13632 ?

Regards,
David

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: Finding an object by ID
« Reply #1 on: November 18, 2014, 07:49:17 pm »
Code: [Select]
select name from object_properties where object_id=13632;

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7140
    • View Profile
Re: Finding an object by ID
« Reply #2 on: November 19, 2014, 12:06:10 am »
Hi,

looks like a bug in nxdbmgr. As this is interface object, you can safely answer "no" here, and answer "yes" when nxdbmgr offers you to delete it. It then will be re-created by configuration poll.

Best regards,
Victor

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Finding an object by ID
« Reply #3 on: November 19, 2014, 03:23:38 pm »
Hi Alex,

 Where do I run "select name from object_properties where object_id=13632;" and how do I view the result, I was hoping there was a command line I could just type what is the name of the object with ID=13632 and it would return the result on the command console?

Regards,
David

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: Finding an object by ID
« Reply #4 on: November 19, 2014, 10:08:27 pm »
That's SQL query, use tool provided by your database engine to execute it.