A re-thread but worth re-iterating this one as can stir you out of a pickle with your XenApp 6.x DB without you knowing it.
First make sure you have a backup taken of your citrix datastore database. Then run following commands :
DSCheck /full servers /silent >c:\servers.txt
DSCheck /full apps /clean> c:\apps.txt
DSCheck /full printers /clean> c:\printers.txt
DSCheck /full groups /clean> c:\groups.txt
For xenapp 6.x environments run the additional command
DSCheck /full worker groups /clean > c:\workergroups.txt