Please add bellow script on magento root. Eg file (xyz.php) and run this file in browser then results are attributes that do not belong to an attribute set.
<?php
require_once('app/Mage.php');
Mage::app('default');
class AR
{
public function index()
{
//$attributeSetIds = array(4);
$attributeSetIds = Mage::getModel('catalog/product')->getDefaultAttributeSetId();
$collection = Mage::getResourceModel('catalog/product_attribute_collection')
->setAttributeSetFilter($attributeSetIds)
->load();
$attributesIds = array('0');
/* @var $item Mage_Eav_Model_Entity_Attribute */
foreach ($collection->getItems() as $item) {
$attributesIds[] = $item->getAttributeId();
}
$attributes = Mage::getResourceModel('catalog/product_attribute_collection')
->setAttributesExcludeFilter($attributesIds)
->addVisibleFilter()
->load();
$html .= '<h2>Product(s) Unassigned Attributes List</h2>';
$html .= '<table style="border-style: solid solid solid; border-width: 1px 1px 1px; width: 100%;">
<thead>
<tr>
<th>Attribute ID#</th>
<th>Attribute Label</th>
<th>Attribute Code</th>
</tr>
</thead>
<tbody>';
if(count($attributes)) {
foreach ($attributes as $attribute) {
$html .= '<tr>';
$html .= '<td align="center">'.$attribute->getAttributeId().'</td>';
$html .= '<td align="center">'.$attribute->getFrontendLabel().'</td>';
$html .= '<td align="center">'.$attribute->getAttributeCode().'</td>';
$html .= '</tr>';
}
}else {
$html .= '<tr class="even"><td colspan="3" align="center">Attribute(s) not found.</td></tr>';
}
$html .= '</tbody></table>';
echo $html;
//$this->removeAttribute($code);
}
public function removeAttribute($code='')
{
$installer = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = (int) $installer->getEntityTypeId('catalog_product');
$installer->startSetup();
$installer->removeAttribute($entityTypeId ,$code);
$installer->endSetup();
}
}
$obj = new AR();
$obj->index();
?>
Also i have added remove attribute code in above script but right now it is commented
Note: Please always backup your database after use script.