Liferay 6: SQL Query to know where a portlet is deployed
This SQL query lets you know where (site name + layout friendly URL) are deployed the instantiated portlets.
select pp.portletId, group_.name, layout.friendlyURL
from
PortletPreferences pp,
Layout layout,
Group_ group_
where
pp.plid = layout.plid
and group_.groupId = layout.groupId
and portletId like '%<YOUR_PORTLET_ID>%'
;
Replace <YOUR_PORTLET_ID>
by the portletId.