Pages

Wednesday, October 28, 2009

Event ID: 1023 Perflib errors

Below is the script we use to remedy the event 1023 error on our servers when we come across it. As usual, don't forget to edit the email address.

Script Name: Event ID: 1023 Clean up Perflib errors on C, D, E


Script Description: This script fixes permissions on sqlctr80.dll file under SQL directories that causes problems with Kaseya and generates PERFLIB errors in the application event log
IF True


THEN


Get Variable


Parameter 1 : 4


Parameter 2 :


Parameter 3 : agentDrv


OS Type : 0


Get Variable


Parameter 1 : 6


Parameter 2 :


Parameter 3 : machineName


OS Type : 0


Execute Shell Command


Parameter 1 : forfiles.exe -p c:\ -s -m sqlctr80.dll -c "cmd /C cacls @PATH /e /g 0x22network service0x22:r >> #agentDrv#temp\sqlfiles.txt"


Parameter 2 : 1


OS Type : 0


Execute Shell Command


Parameter 1 : forfiles.exe -p d:\ -s -m sqlctr80.dll -c "cmd /C cacls @PATH /e /g 0x22network service0x22:r >> #agentDrv#temp\sqlfiles.txt"


Parameter 2 : 1


OS Type : 0


Execute Shell Command


Parameter 1 : forfiles.exe -p e:\ -s -m sqlctr80.dll -c "cmd /C cacls @PATH /e /g 0x22network service0x22:r >> #agentDrv#temp\sqlfiles.txt"


Parameter 2 : 1


OS Type : 0


Get Variable


Parameter 1 : 1


Parameter 2 : #agentDrv#temp\sqlfiles.txt


Parameter 3 : Sqlfiles


OS Type : 0


Send Email


Parameter 1 : *EMAIL@ADDRESS.COM*


Parameter 2 : #machineName#


Parameter 3 : #Sqlfiles#


OS Type : 0


Delete File


Parameter 1 : #agentDrv#temp\sqlfiles.txt


OS Type : 0


ELSE