I'm having a seemingly identical problem to what is described here: SSDT Refactor Rename is ignored by the Schema Comparison script generation. Essentially, the refactor component of SQL Server Data Tools is not working on schema comparison/update. Instead of renaming a table, for instance, the table with the old name is dropped and the table with the new name is created. Unfortunately, I do not see an accepted answer to that question. I found a similar question, which seems to be have been asked by the same person on MSDN; see: Refactor Rename is ignored by the Schema Comparison script generation. Again, it doesn't look like an acceptable answer was proposed. I would really like to figure out how to get this feature to work. Does anyone have an idea?
相关问题
- Resharper 7 on VS2012 ignores assembly redirect in
- An INSERT EXEC statement cannot be nested. Dealing
- Error installing MVVMCross from nuget into a PCL
- Why can't I bind to winproc?
- Ignore null values when using SQL Server 2012'
相关文章
- Visual Studio Hangs on Loading UI Library
- “Csc.exe” exited with code -1073741819
- Azure data transfer Identity Column Seed Jumped by
- Add Fakes Assembly option missing
- Get All Dates of Given Month and Year in SQL Serve
- Visual Studio wants to build with wrong platform t
- Permissions error when attaching a database: “Cann
- Visual Studio 2012 debug tests keyboard shortcut
Figured out the cause of this problem. I noticed that when doing a schema compare against my SQL Data Tools project and a different (yet essentially identical) database, the refactor component was in fact considered. I took a look at the generated SQLCMD script, and at the bottom saw lots of entries that looked like this...
IF NOT EXISTS (SELECT OperationKey FROM [dbo].[__RefactorLog] WHERE OperationKey = 'ce3d4c93-c1c4-4967-9cd5-0048d1e7d22f') INSERT INTO [dbo].[__RefactorLog] (OperationKey) values ('ce3d4c93-c1c4-4967-9cd5-0048d1e7d22f')
I took a look at the database on which I was having problems and sure enough, under System Tables in SS MS, I found dbo.__RefactorLog. After truncating this table, the schema comparison again showed the proper refactoring.