When using the Schema Compare tool with SSDT in Visual Studio 2012 to update a database project with changes made to schema objects on a local database, the schema is 'lost' from the object declaration. I am connected to my local sql server instance using a Windows account and this account has default schema of dbo on the database being compared.
For example, a local stored procedure definition may be:
CREATE PROCEDURE [dbo].[SetPriceBounds]
But when this is added to the database project using schema compare, it becomes:
CREATE PROCEDURE SetPriceBounds
When this is subsequently deployed to another SQL Server instance, it fails with the error:
The default schema does not exist.
I need to get the dbo.
prefix preserved when the schema comparison is executed, any ideas are welcome.