How to delete orphaned Project Database?
The database specified is already used by another project server. Enter a different server or database name and try again.
To delete orphaned Project Database
1. Run: Get-SPDatabase | Select Name
2. Identify the database which you want to delete and open SQL Management Studio
3. Select SharePoint ConfigDB and run this query
SELECT OD.ID AS DepID,OD.Name AS DepName, O.ID AS ObID,O.Name AS ObName
FROM Objects AS O
INNER JOIN Dependencies AS D ON O.ID = D.ObjectID
INNER JOIN Objects AS OD ON D.DependantID = OD.ID
WHERE O.Name like ‘ProjectServer_Archive’
4. Get the GUID ID of the orphaned Project Server Database
5. Copy DepID and open STSADM
stsadm.exe -o deleteconfigurationobject -id <objectId>
stsadm.exe -o deleteconfigurationobject -id B41E07C6-BFE4-4F70-96AB-D4FCB1514A63
6. Perform the steps 3 to 5 for all the orphaned database and create Project Site.