Troubleshooting Metadata Storage Service
This topic lists solutions to the following common problems that can occur when you are using Metadata Storage Service:
-
Initialize or Get Replica Metadata Fails in Existing Metadata Store
For more troubleshooting help for problems that are not listed here, see this Microsoft Web site.
Initialize or Get Replica Metadata Fails in Existing Metadata Store
An existing metadata store can be opened but calls to initialize or get replica metadata fail with the following exceptions (for managed code) or errors (for unmanaged code):
Managed code InitializeReplicaMetadata throws MetadataStorageEngineException or GetReplicaMetadata throws ReplicaMetadataNotFoundException.
Unmanaged code ISyncMetadataStore::InitializeReplicaMetadata returns SYNC_E_METADATA_STORAGE_ENGINE_ERROR or ISyncMetadataStore::GetReplicaMetadata returns SYNC_E_METADATA_REPLICA_NOT_FOUND.
This problem occurs when the format of the storage file that is used by Metadata Storage Service changes, such as when the metadata storage file was created by an earlier version of Metadata Storage Service. In particular, the technology preview versions of Metadata Storage Service used a different storage file format than the final release version. Therefore, metadata storage files that were created by using technology preview versions will not work correctly with the release version.
Solution
Delete the metadata storage file and create a new one by using CreateStore (for managed code) or ISqlSyncMetadataStore::CreateStore (for unmanaged code).