SELECT DISTINCT D.SiteID, D.WebId, W.FullURL as WebURL, D.Id As DocumentId,
D.DirName, D.LeafName, tp_ID As WebPartSK
FROM dbo.Docs D WITH (nolock)
INNER JOIN dbo.Webs W WITH (nolock) ON D.WebID = W.Id
INNER JOIN dbo.WebParts WP WITH (nolock) ON D.Id = WP.tp_PageUrlID
WHERE WP.tp_ListId Is Null AND WP.tp_Type Is Null AND WP.tp_Flags Is Null
AND WP.tp_BaseViewID Is Null AND WP.tp_DisplayName Is Null
AND WP.tp_Version Is Null
AND WP.tp_WebPartTypeId='<your web parts id>'
Source for this query is Ryan's comment her:
http://stackoverflow.com/questions/1498409/sharepoint-find-where-webpart-is-in-use
[…] One thing to add. Use the query here to find the name of the pages that contain the offending webparts. I thought deleting the page would make them go away, but I was wrong. I had to recover the pages that I deleted from the recycle bin and then open them in web part maintenance view (appending “?contents=1″ to the url and then delete the webparts from the page. http://surfpointtech.com/2012/06/28/how-to-find-a-sharepoint-webpart-name-from-the-id-or-guid/ […]
This query is just what I need. Now all I need to know is which of the gazillion SharePoint databases to use to run the query. Can you give us a hint?
Yes, run it on your content database.