Last active
October 2, 2022 15:14
-
-
Save agehlot/30a5bf5a3ecf09b5fbbaff7cfa57b2bf to your computer and use it in GitHub Desktop.
These are the SQL scripts that can be used to delete all contacts and their interactions and make the xdb clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [yourdatabaseprefix.Collection.ShardX] | |
GO | |
DELETE FROM [xdb_collection].ContactIdentifiers | |
Delete from [xdb_collection].ContactFacets | |
Delete from [xdb_collection].InteractionFacets | |
Delete from [xdb_collection].Interactions | |
Delete from [xdb_collection].Contacts | |
--For Sitcore 9.3 | |
Delete from [xdb_collection].ContactIdentifiersIndex | |
Delete from [xdb_collection].DeviceProfileFacets | |
Delete from [xdb_collection].DeviceProfiles | |
Delete from [xdb_collection].DeviceProfileFacets | |
Delete from [xdb_collection].DeviceProfileFacets | |
--You also need to clean the interactions out of the processing pool | |
TRUNCATE TABLE [xdb_processing_pools].[InteractionLiveProcessingPool] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment