Schema compare fails, SQL Server 2008 R2 & VS2010 Premium with time out expired error

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 20:48:52

问题


I have a VS2010 DB Project migrated form VS2008 and a couple of schema comparisons created.

I get the following error:

Error 1 An error was received from SQL Server while attempting to reverse engineer elements of type Microsoft.Data.Schema.Sql.SchemaModel.ISqlUser: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Error 2 ExecuteReader requires an open and available Connection. The connection's current state is closed.

I am using VS2010 Premium and SQL Server 20008 R2 on my dev machine.
My database is hosted on local instance of SQL server.
When I use the same schema comparision with a remote server and use the sa login it works. On my dev machine, I tried with sa login as well. but no luck!

Has anyone encountered such an issue and was able to resolve?


回答1:


Well cracked it! (not sure if that is the solution, at least it now works for me)

The local databases I was using for schema comparison were restored from backups of production databases. The users in the databases will loose their SID (probably) with the ones mapped on the production server.

I simply deleted the database users and recreated them and the schema comparison started working again.



来源:https://stackoverflow.com/questions/3446854/schema-compare-fails-sql-server-2008-r2-vs2010-premium-with-time-out-expired

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!