locked
Remove orphaned OWSC in Sharepoint 2013 - "/sites/Office_Viewing_Service_Cache" RRS feed

  • Question

  • I would like to migrate old SP 2013 to SP 2016 and this old subsite is still visible my the Intranet WebApp

    How do i remove the "/sites/Office_Viewing_Service_Cache" subsite from my Wep App ?

    We have migrated Long time ago from SharePoint 2010 with a Web App Server to SharePoint 2013.
    We do not use a WebApp Server anymore, the Features are disabled.

    Is there any way to remove the subsite with SQL SSMS ?

    Friday, June 15, 2018 4:00 PM

Answers

  • Finally …
    This did the trick ..

    $siteUrl = "http://fqdn/websites/Office_Viewing_Service_Cache"
    $site = get-spsite $siteUrl
    $siteId = $site.Id
    $siteDatabase = $site.ContentDatabase
    $siteDatabase.ForceDeleteSite($siteId, $false, $false)

    • Marked as answer by Jürgen Barth Monday, July 2, 2018 10:03 AM
    Monday, July 2, 2018 10:03 AM

All replies

  • Hi,

    You can using the following command to delete orphaned objects.

    $db = Get-SPDatabase "Content_DB_Name";
    
    #note set this to $true if you want it to actually repair the database. $false will just list what it would repair
    
    $db.Repair($true);


    Information about deleting orphaned sites:

    https://social.technet.microsoft.com/wiki/contents/articles/21968.sharepoint-deleting-orphan-sites.aspx

    Best regards,

    Linda Zhang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Wednesday, June 20, 2018 9:44 AM
  • Thanks Linda,

    this doesn´t work.

    This is what i get from SharePoint <OrphanedObjects Count="0" />
    How do i remove this or do i Need to remove a site Collection?

    Thanks 

    Jürgen

    Thursday, June 21, 2018 10:11 AM
  • Hi,

    Please ensure the orphaned site exists in the database that you checked.

    In addition, try using the following command to delete this site collection.

    Remove-SPSite -Identity "http://Sitecollection"


    Best regards,

    Linda Zhang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, June 22, 2018 2:00 AM
  • Thanks, but this doesn´t work.

    Remove-SPSite : <nativehr>0x80070003</nativehr><nativestack></nativestack>

    At line:1 char:1
    + Remove-SPSite -Identity "http://SiteCollection"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (Microsoft.Share...mdletRemoveSite:SPCmdletRemoveSite) [Remove-SPSite], Dir
       ectoryNotFoundException
        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRemoveSite

    Friday, June 22, 2018 9:40 AM
  • Hi,

    Please try to detach and attach the content database, compare the results.

    How to attach or detach content databases in SharePoint Server:

    https://docs.microsoft.com/en-us/sharepoint/administration/attach-or-detach-content-databases

    Best Regards,

    Linda Zhang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, June 25, 2018 2:08 AM
  • Hi, i dismounted all of the content db`s.

    Get-SPContentDatabase -WebApplication Intranet | Dismount-SPContentDatabase

    Currently i´can mount these databases but i have no sites.

    I get a CurrentSiteCount of 0, sometimes it´s 1 or 2 …
    But i have orphaned [/] sites and i can´t reach the root sites.

    I have 3 test Server installed with Windows 2016, SQL 2016 and SHP 2016.
    All 3 behave different, not one that works fine.

    I will try to move the site to a new database and migrate this one.

    It´s all a bit strange to me...


    Tuesday, June 26, 2018 1:36 PM
  • Finally …
    This did the trick ..

    $siteUrl = "http://fqdn/websites/Office_Viewing_Service_Cache"
    $site = get-spsite $siteUrl
    $siteId = $site.Id
    $siteDatabase = $site.ContentDatabase
    $siteDatabase.ForceDeleteSite($siteId, $false, $false)

    • Marked as answer by Jürgen Barth Monday, July 2, 2018 10:03 AM
    Monday, July 2, 2018 10:03 AM