Page 1 of 2
Maintenance Script
Posted: Sun Sep 04, 2016 3:03 pm
by vkent39
Is this accurate behavior for Chocolatey to create a bunch of maintenance scripts?

- Chocolatey.PNG (46.97 KiB) Viewed 22051 times
Re: Maintenance Script
Posted: Mon Sep 05, 2016 7:30 pm
by coriron
I'm seeing this also. Going to take forever to delete them all...
Re: Maintenance Script
Posted: Tue Sep 06, 2016 12:29 pm
by Cubert
Nope, this is something jammed in the plugin install process during the plugin manager update.
To fix.
Disable the plugin and remove, restart the DBAgent,
Run the following command in SQLYog
Code: Select all
DELETE FROM scheduledscripts WHERE scriptid = (SELECT ScriptID FROM lt_scripts where ScriptName = '%Chocolatey%II%')
Next reinstall plugin and enable, restart the dbagent again and 1 Chocolatey For Labtech script should exist and not duplicate.
Also verify you are on the latest Chocolatey DLL as Chocolatey II is now Chocolatey for labtech.
Re: Maintenance Script
Posted: Tue Sep 06, 2016 4:32 pm
by tobycarver
I'm on a hosted solution for LabTech and don't have direct access to the SQL database. Any suggestions apart from manually deleting each one for this deployment?
Re: Maintenance Script
Posted: Tue Sep 06, 2016 5:42 pm
by Cubert
Yeap,
Use my handy dandy SQL query analyzer for LabTech, this adds the ability to execute SQL command directly.
http://www.plugins4labtech.com/plugins. ... E6759999B4
Re: Maintenance Script
Posted: Tue Sep 06, 2016 7:31 pm
by tobycarver
Thanks. If I have the new Chocolatey plugin, do I still need to uninstall the current Chocolatey plugin before running the sql script to remove the old maintenance scripts?
Re: Maintenance Script
Posted: Tue Sep 06, 2016 7:52 pm
by tobycarver
OK, I went ahead and tried to run the script and it said it could not find the table. I assume the table it's referring to is "scheduledscripts". What am I doing wrong?
Re: Maintenance Script
Posted: Wed Sep 07, 2016 8:34 pm
by Cubert
Toby,
Remove all existing plugin_sw_chocolatey_xx tables from mySQL using SQLYog and restart the dbagent. this will fix your issues.
Re: Maintenance Script
Posted: Wed Sep 07, 2016 8:46 pm
by tobycarver
I do that by removing the plugin, then adding it back?
Re: Maintenance Script
Posted: Wed Sep 07, 2016 9:03 pm
by Cubert
nope open SQL yog and select each table and then right click and select drop table.