Sunday, September 11, 2011 5:13 AM
I tried to delete a web app from Central Admin. It raised an error. The IIS website got deleted. But the clontent db and the reference to the web app did not get removed from the Central Admin. Since then, I have been trying to delete this via powershell with the following being reported:
Get-SPWebApplication http://myWebAppURL | Remove-SPWebApplication
Remove-SPWebApplication : An object in the SharePoint administrative framework, "SPWebApplication Name=myWebAppName", could not be deleted because other objects depend on it. Update all of these dependants to point to null or different objects and retry this operation. The dependant objects are as follows:
At line:1 char:79
+ Get-SPWebApplication myWebAppURL | Remove-SPWebApplication <<<<
+ CategoryInfo : InvalidData: (Microsoft.Share...PWebApplication:SPCmdletRemoveSPWebApplication) [Remove-
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRemoveSPWebApplication
Since it does not show what the dependent object is, I have no way of knowing what it is. I don't see any pending timer job for this web application.
To summarize, the web app is:
- Showing in Central Admin
- Corresponding IIS sites are gone
- Content DB is still there in database
How do I proceed?
Sunday, September 11, 2011 5:47 AM
check this url
Regards, Fadi Abdulwahab. http://sqlgoogler.blogspot.com/ Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you
Sunday, September 11, 2011 3:14 PM
Thanks Fadi for directing me to Kailashs' blog. The difference is in his error message has a specific dependent object
The dependant objects are as follows: SPSolutionDeploymentJobDefinition Name=solution-deployment-mywebpart.wsp-0 Parent=SPTimerService Name=SPTimerV3“.
However, my error does not give this specific object. That means I don't know what the dependent object is.
Sunday, September 11, 2011 4:25 PM
Did you try this?
Aryan Nava | Twitter: @cloudtxt | Blog: http://virtualizesharepoint.com
Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
Disclaimer: This posting is provided "AS IS" with no warranties.
Sunday, September 11, 2011 6:41 PMYes Aryan. I tried this. The web(service) app pool won't delete saying there is a web application that uses the app pool. On the other hand, I am not able to delete the web app itself that gives the error given in my initial post.
Thursday, October 27, 2011 8:13 PMAlthough I could not get a very clean resolution, I could get around with this problem by creating a new webapp and attaching the content db to that webapp. However, before doing this, I had to try deleting all orphanned objects from SharePoint. Followed a blog similar to http://sharepointserver-2007.blogspot.com/2008/10/how-to-delete-orphan-configuration.html. Once the above was done, I could create a new webapp and take the content db of the old webapp that I could not delete and attach.
Tuesday, May 01, 2012 5:17 PM
were you ever able to remove the original "problem" web application? It looks like you were able to recreate a new one and move the content to it, but that you were not able to clean up the original one.
Tuesday, May 01, 2012 5:59 PM
Tuesday, May 15, 2012 4:24 PM
for what it is worth... It was able to be cleared up with a MS call. they had ot look in the sitemap database to determine a GUID and then run powershell commands to delete the non-existent db reference. Highly reoemmend caution when doing this since it would be working directly with GUID's. contact me is you wish the powershell commands.
Tuesday, May 15, 2012 5:24 PM
I wish the powershell commands if you have time please. May be wtih a little bit of some step by step explanation.
Thanks, Soumya | MCITP, SharePoint 2010
Tuesday, May 15, 2012 9:20 PM
After determine the GUID of the offending database (it is in the sitemap table of the config database, but it is not supported to query the database itself so you will need to look in a restored backup of that database :) ) then you can execute the following powershell:
$db-Get-SPDatabase -id <GUID you recovered above>;
This removed the site collection that was causing issues.
Note: The "$db" step is not needed, but PLEASE do it to verify you have the correct database. If you have the correct one it will have no value for the web applicaiton name, but the Site Collection count will be 1.
Hope this helps someone else too.
- Proposed As Answer by 2010SharePointer Tuesday, October 09, 2012 5:56 PM
Tuesday, May 15, 2012 9:27 PMOK thanks Eric.
Thanks, Soumya | MCITP, SharePoint 2010