SQL Content DB cleaning for Content Deployment (in case of duplicates/null in SQL)

Aleksandr Savenko -

1) Please check if you delete list from All Site Content and Recycle Bin before executing following queries!!!

2) Please edit queries with required ID's and Titles based on your case


SELECT *
From AllDocs
WHERE DirName LIKE '%Benefit%'

SELECT *
FROM AllLists
WHERE tp_Title ='Benefit Types'

SELECT *
From AuditData
WHERE DocLocation LIKE '%es/Lists/Benefit%'

SELECT *
From AllDocs
WHERE LeafName = 'BenefitTypes'

DELETE FROM AllDocs
WHERE ListId = '2F3A7C6C-647C-447B-AB08-A72B678B2220';

DELETE FROM AllListsAux
WHERE ListId = '2F3A7C6C-647C-447B-AB08-A72B678B2220';

DELETE FROM AllListsPlus
WHERE ListId = '2F3A7C6C-647C-447B-AB08-A72B678B2220';

DELETE FROM AllLookupRelationships
WHERE ListId = '2F3A7C6C-647C-447B-AB08-A72B678B2220';

DELETE FROM AllUserData
WHERE tp_ListId = '2F3A7C6C-647C-447B-AB08-A72B678B2220';

DELETE FROM RecycleBin
WHERE ListId = '2F3A7C6C-647C-447B-AB08-A72B678B2220';

DELETE FROM AllUserDataJunctions
WHERE tp_SourceListId = '2F3A7C6C-647C-447B-AB08-A72B678B2220';

DELETE FROM AllDocs
WHERE DirName LIKE '%Benefit%' AND ListId IS NULL

Have more questions? Submit a request

Comments

Powered by Zendesk