Steve Giller Posted January 30, 2018 Share Posted January 30, 2018 Somehow (well, I know how but I'm not pointing fingers!) we have a number of assets that have been entered into the system under the incorrect type: specifically tablets that have been entered as Mobile Devices, but identify within SCCM as Laptops Is there an easy way to rectify this, as they can not now update because the import is trying to put laptop data into the mobile device extended table which cannot be done for obvious reasons. Link to comment Share on other sites More sharing options...
ArmandoDM Posted January 30, 2018 Share Posted January 30, 2018 Hi @DeadMeatGF when an asset is created, there are 2 tables that get: populated h_cmdb_assets and h_cmdb_asset_<CLASS>. To rectify the assets entered under the incorrect type would require deleting the records from h_cmdb_asset_mobile_device, add the appropriate records to h_cmdb_asset_computer, and then update h_cmdb_assets to update the class, the type id and the foreign key to h_cmdb_asset_computer. In theory its possible, but its a bit risky and easy to make mistakes. If the assets have been added through an import tool, it would be easier to delete them and add back in with the correct type? Thanks Armando Link to comment Share on other sites More sharing options...
Steve Giller Posted January 30, 2018 Author Share Posted January 30, 2018 Thanks @ArmandoDM - that was my thinking. Do you know how that would affect their Request history? Link to comment Share on other sites More sharing options...
ArmandoDM Posted January 30, 2018 Share Posted January 30, 2018 Hi @DeadMeatGF if you update the database tables with queries, the changes will not be added to the history, which will stay as it is. After you have run your queries to amend the asset type, further changes to the assets done through the UI will be appended to the old history. Armando Link to comment Share on other sites More sharing options...
Steve Giller Posted January 30, 2018 Author Share Posted January 30, 2018 I'm looking at the table - if I create a new entry for Tablet as a subclass of Computer (instead of Mobile Device) then update h_class to 'computer' and h_type to the new type value in h_cmdb_assets will the next import then populate the required data in h_cmdb_assets_computer? If so, the cleanup would be to delete entries in h_cmdb_assets_mobile_device where h_type = 14 (the Tablet type ID) Should that be sufficient to correct things? Link to comment Share on other sites More sharing options...
ArmandoDM Posted January 30, 2018 Share Posted January 30, 2018 In order to update the assets you need: 1. in h_cmdb_assets : update h_class and h_type 2. in h_cmdb_asset_computer you need to add h_pk_asset_id (the same ID as the asset), h_name (the name of the asset as in h_cmdb_asset), h_type. Not sure if the cleanup tool will remove the entries in h_cmdb_assets_mobile_device, as the type and the asset he refers to will be still there. Link to comment Share on other sites More sharing options...
Steve Giller Posted January 30, 2018 Author Share Posted January 30, 2018 I gambled - it appears to have worked! We shall see what the overnight update brings ... Thanks for the help. Link to comment Share on other sites More sharing options...
ArmandoDM Posted January 30, 2018 Share Posted January 30, 2018 Great. Feel free to post any issue which may come overnight. Regards Armando Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now