Trying to Update Assets with Ticket Rule
I'm new to KACE and have inherited a system that has been under utilized. One of our admins has just pushed out the agent and we are seeing devices/assets starting to appear, which is great. I'd like to start updating some of the fields on a bulk basis and I read that you could do it through Ticket Rules, but I'm getting an access denied message. Eventually we'll want to update specific fields based on certain criteria, but right now I'm just looking to mark all the assets as "Active". I did a bit of Googling and came up with this very basic set of instructions. 493 is the ID for the "Active" status.
Enter Select SQL:
SELECT ASSET.NAME AS ASSET_NAME
Enter Update SQL:
When I run this I get an error: 12/05/2023 11:25:09> Starting: 12/05/2023 11:25:09 12/05/2023 11:25:09> Executing Select Query... 12/05/2023 11:25:09> selected 609 rows 12/05/2023 11:25:09> Executing Update Query... 12/05/2023 11:25:09> mysqli error: [1142: UPDATE command denied to user 'B1'@'localhost' for table 'ASSET_STATUS_ID'] in EXECUTE("UPDATE ASSET.ASSET_STATUS_ID SET ASSET.ASSET_STATUS_ID=493 ") 12/05/2023 11:25:09> Ending: 12/05/2023 11:25:09
I'm logged in with my own account, which is an admin user, and I don't see the 'B1' user listed anywhere, although I understand it's a default.
If you simply want to update the asset status you can do that in "Asset Management/Asssets". Select all assets, click on Choose Action/Change Asset status.
Please be very careful with ticket rules and have a test appliance where you can try certain things as you can destroy the database with an update query and then you need to restore the whole appliance. Always create also a backup before you do this and enable offboard backup or download the backup from the appliance so that you are able to restore it.
The very best here is to contact your sales rep or partner where you bought your licenses and get a training for ticket rules as you get better insights and understanding of how that works. Hope that helps you :)
Ah yes, that would be much easier. Thanks for the response. I'm not a programmer by any stretch, but I like trying to figure things out, so I tend to Google a lot of the syntax. You're suggestion is ideal for Asset Status, but I'm hoping to start creating some mass updates base don other parameters. I think the training is the way to go., but for this particular item I did happen to find out that it must have been my Syntax. I ended up finding the right syntax to mark all of my device subtypes of "laptops" to Active. The Active ID is 493 and the ID for the subtype Laptop is 11003, and the below ended up working for me. It likely isn't perfect, but it's a start:
SELECT ID,ASSET_CLASS_ID FROM `ORG1`.`ASSET`
where ASSET_CLASS_ID = 11003