Troubleshooting Schema Compare Issues
You might encounter the issues in this topic when you compare two database schemas.
To generate the correct order of objects in an update script, Schema Compare examines object dependencies. For example, if a view depends on a table, the table must be created before the view. If the object that depends on the second object does not use a schema-qualified name, the dependency might not be identified and the update or creation script might have statements in an incorrect order. This difference can cause errors when you update a target to match a source or deploy changes to a database. This issue also applies to database build scripts.
To work around this issue, make sure to schema-qualify the names of objects that are involved in dependent relationships. In the following example, you can guarantee that the dependency will be correctly identified if you change the end of the statement to reference [dbo].[KeysTable] instead of just KeysTable:
CREATE VIEW [NewUser].[ViewReferencingScalarFunction] AS SELECT Column2, dbo.SimpleMultiplyParamByTwo(PK_Column) AS [Function] FROM KeysTable
If you receive a time-out error when you compare the schemas of large databases, you might need to increase the time-out value. This option is not exposed through the user interface. You must modify the QueryTimeoutSeconds value that is stored in the registry under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\DBPro\Database and specified in seconds. By default, the time-out is 60 seconds.