Description
Applies to LDMS 8.7, 8.8, 9.0
After deleting a node from the LDMS Console and refreshing the node pops back up into the list.
Console.exe.log:
3/7/2008 10:03:56 AM : Critical Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
at IDALLib.IDALRecordsetClass.DeleteDevices(String conStr, Object& pvtDevices)
Or:
Database.ExecuteDataTable: System.Data.OleDb.OleDbException: Invalid object name 'AlertRulesetDeployment'.
Key Words: Unable to Delete Nodes, Can not Delete Nodes, Cannot Delete Nodes, Unable to Delete Devices, Can not Delete Devices, Cannot Delete Devices.
Cause
There are two causes to this issue:
1) There is metadata in the LANDesk database which references in the delete query that no longer exists. The list of tables is created from the METAOBJATTRRELATIONS table.
Or
2) There is metadata missing for tables or columns that do exist in the database. LANDesk must have metadata to map out its delete statements.
Resolution for cause 1)
For LDMS 9.0Only, apply patch DB-4196790. Reboot is required!
For LDMS 9.0 SP2, apply patch DB-5236490.2 (Get from support).
If the problem still exists or forLDMS 8.8 or prior versions see below.
1) Stop all the LANDesk & Intel services
2) Backup the LANDesk DB
3) For SQL Databases
deletefrom METAOBJATTRRELATIONS where tablename in (selectdistinct tablename from METAOBJATTRRELATIONS where tablename notin (select table_name from information_schema.tables))
4) For Oracle Databases
These commands should be run by an Oracle DBA. First you must compare the meta data with the actual data, replace the word 'LANDESK' with the correct user.
selectupper(tablename) from METAOBJATTRRELATIONS
minus select table_name from all_tables where owner = 'LANDESK';
This will return the result you will use with the next statement to delete the bad reference. DO NOT DELETE VIEWS, only delete the incorrectly referenced table which is generally ALERTRULESETDEPLOYMENT.
Run the next command to remove the invalid table reference.
Replace the with the result tablename (not views) returned in the first query.
deletefrom METAOBJATTRRELATIONS whereupper(tablename) = '
Resolution for cause 2)
This is a manual process of manually attempting to delete the record from the computer table. SQL studio will provide you the error which states what table that contains data for this computer still. It is either this table or one it depends on which doesn't have metadata.
Once the bottom level table or child table is found and a record is able to be deleted, then: select * metaobjattrrelations where tablename = 'tablename'
If no records are returned then metadata doesn't exist for this table.
Contact support or manually create metadata.
Run DBRepair.exe then CoreDBUtil.exe
-DBRepair
4) Download the Correct version of DB Repair from: Community article DOC-2297
5) Copy the file to ...\LANDesk\ManagementSuite.
6) Stop the LANDesk Inventory Server service.
7) Run DBRepair(DO NOT Run from a share (ldmain))
8) Click on each item except for anything under "Custom Data" and click the clean button.
9) Close DBRepair.
-CoreDBUtil
10) Run CoreDBUtil.exe from ...\LANDesk\ManagementSuite\ folder
11) Click the Build Components button (This compares the database to the file Datamart.xml and makes repairs. It usually takes 5-15 minutes. DO NOT Stop the process!!!)
12) When the Build Components process finishes a message will appear that says that the process is done.
13) Close CoreDBUtil.
14) Start the LANDesk Inventory Server service.
15) Start the LANDesk & Intel services that had been stopped in step 1 or alternatively reboot the core server.
NOTE: An issue has been resolved with the upgrade from 8.7 SP5 to 8.8 with the following SQL Query:
Update metaobjattrrelations set tablename = 'UNMODELEDDATA' WHERE TABLENAME = 'ALERTRULESETDEPLOYMENT'
Article on how to install Microsoft SQL Management Studio Express and Run a query:
http://community.landesk.com/support/docs/DOC-5764