DEFAULT_SCHEMA clause cannot be used with a Windows group
Published 07 February 2013
When running a schema synchronization script, the following error may occur, and the synchronization will fail.
The DEFAULT_SCHEMA
clause cannot be used with a Windows group or with principals mapped to certificates or asymmetric keys.
Cause
The cause of this issue is that SQL Compare and SQL Packager cannot reliably determine whether a Windows user is an actual user or a group. Windows groups can be mapped to SQL Server users just as Windows users, but a default schema cannot be specified for a Windows group. Unfortunately, not specifying a default schema for a Windows user can lead to other problems.
How to fix
The only possible workaround for this issue is to note the name of the group in the error dialog, and remove that SQL Server user from the synchronization.