Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Thanks for your answer Thriggle. Unfortunatelly I can't try it since my problem is resolved. But I'm curious, do you know if Repair($true) is OK with Microsoft ? It's object model accessing, so I'd say it is, but there's something close in the forbidden operations list : "Running DBCC_CHECKDB WITH REPAIR_ALLOW_DATA_LOSS (However, running DBCC_CHECKDB WITH REPAIR_FAST and REPAIR_REBUILD is supported, as these commands only update the indexes of the associated database.)" link Commented May 4, 2016 at 15:30
  • 1
    Yep, I'm certain it's supported. The forbidden operation is referring specifically to a SQL command, DBCC CHECKDB. The REPAIR_ALLOW_DATA_LOSS option on that command is unsupported because threatens referential integrity. SPContentDatabase.Repair(true) will delete orphaned objects, but won't jeopardize the database's referential integrity. Commented May 4, 2016 at 15:37