Running Scoping tool and stsadm -o databaserepair but the results is showed different, but the scoping tool is listed more orphan sites. so we decide to clean up the orphan sites , due to the stsadm unable to detect that mean the databaserepair will not able to help us to do clean up.
after discuss with mircrosoft , we decide to remove it manually from MOSS SQL DB. This make me excited because can learnt a lot one the MOSS DB table.
This clean up activity we can category in detect , confirm , delete.
Detect stage: Run the scooping tool if don’t have than maybe you can follow the
script at internet .
Confirm stage ( make sure the content is really not in used) :
Results from the detect stage will provided the siteid and content DB.
use the path URL from the script go to CA to check which one is actual use content DB. after this go to sql content DB check the Database id.
once get the Databse id you can keep this is record then can refer to the database id you get from sitemap.
select * from sitemap where id='xxxxxx-xxxxxx--xxxxxxx-xxxxxxxx’
this results will give the orphan database id
select * from SiteMap where Path like 'url'
EXP:
Select * from SiteMap where Path like '/sites/accmgmt'
this will give you the database id same as the CA.(which is the database current in use)
please confirm the orphan databaseid is not same as the CA databaseid
Delete satage ( we will go to the content db to delete the orphan site)
Use [databasename]
exec proc_DeleteSite [siteId]