LabTech Support Forums

SQL to Remove a Client

This forum is for discussion of MySQL database related issues.

Moderator: jware.connectwise

SQL to Remove a Client

Postby apbirch.techstructures » Thu Nov 08, 2012 5:00 pm

Hello,

Does anyone have a SQL Query that will remove a Client and all their associated information? we had them go offline before we could run the uninstall

thanks

Andrew
apbirch.techstructures
Newbie
Newbie
 
Posts: 5
Joined: Sat May 07, 2011 2:36 pm

Re: SQL to Remove a Client

Postby teamits » Fri Nov 09, 2012 12:49 pm

You should just be able to delete/retire the PCs and delete the location and client. The one exception would be if you set a computer to be a probe, since one can't delete a probe; there are forum posts about how to forcibly remove that marker, or v2012 has a script to do that.
Steve
teamits
Hero Member
Hero Member
 
Posts: 1577
Joined: Wed Dec 31, 1969 8:00 pm

Re: SQL to Remove a Client

Postby matt.rohler.myitpros » Fri Nov 09, 2012 4:20 pm

To make it easier put this in a SQL Execute command in a script.

Call sp_DeleteComputer(%computerid%,'Automatically Removed by script Cleanup Offline Agents. Detected as offline for more than 60Days.')

You can change the wording where it gives the reason.
matt.rohler.myitpros
Full Member
Full Member
 
Posts: 176
Joined: Tue Oct 11, 2011 7:28 am


Return to MySQL Database

Who is online

Users browsing this forum: No registered users and 1 guest