Maintenance Script

Support and questions for using and managing Chocolatey NuGet inside of Labtech
vkent39
Posts: 9
Joined: Sat Jan 02, 2016 5:48 pm
8

Maintenance Script

Post by vkent39 »

Is this accurate behavior for Chocolatey to create a bunch of maintenance scripts?
Chocolatey.PNG
Chocolatey.PNG (46.97 KiB) Viewed 17560 times

coriron
Posts: 9
Joined: Wed Dec 30, 2015 4:23 pm
8

Re: Maintenance Script

Post by coriron »

I'm seeing this also. Going to take forever to delete them all...

User avatar
Cubert
Posts: 2468
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Maintenance Script

Post 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.

tobycarver
Posts: 34
Joined: Mon Jan 11, 2016 8:50 pm
8

Re: Maintenance Script

Post 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?

User avatar
Cubert
Posts: 2468
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Maintenance Script

Post 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

tobycarver
Posts: 34
Joined: Mon Jan 11, 2016 8:50 pm
8

Re: Maintenance Script

Post 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?

tobycarver
Posts: 34
Joined: Mon Jan 11, 2016 8:50 pm
8

Re: Maintenance Script

Post 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?

User avatar
Cubert
Posts: 2468
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Maintenance Script

Post by Cubert »

Toby,

Remove all existing plugin_sw_chocolatey_xx tables from mySQL using SQLYog and restart the dbagent. this will fix your issues.

tobycarver
Posts: 34
Joined: Mon Jan 11, 2016 8:50 pm
8

Re: Maintenance Script

Post by tobycarver »

I do that by removing the plugin, then adding it back?

User avatar
Cubert
Posts: 2468
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Maintenance Script

Post by Cubert »

nope open SQL yog and select each table and then right click and select drop table.

Post Reply

Return to “Chocolatey For Labtech”