| Author |
Message |
findtim
Joined: 18 Jan 2011 Posts: 8
|
Posted: Mon Mar 14, 2011 6:00 pm Post subject: Generated DBCC CheckIdent statements missing Schema |
|
|
The code the engine generates to sync two databases is missing the schema name when a table change occurs with an identity column.
Am I missing something in the documentation on how to address this?
Or are there any plans to fix this issue?
Thank you for your help.
This is the code that is generated with the BOLD peices missing:
INSERT INTO [MySchema].[tmp_rg_xx_MyTable]([MyColumn]) SELECT [MyColumn] FROM [MySchema].[MyTable]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
SET IDENTITY_INSERT [MySchema].[tmp_rg_xx_MyTable] OFF
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
DECLARE @idVal INT
SELECT @idVal = IDENT_CURRENT(N'MySchema.MyTable')
DBCC CHECKIDENT('[MySchema].[tmp_rg_xx_MyTable]', RESEED, @idVal)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
DROP TABLE [MySchema].[MyTable]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
EXEC sp_rename N'[MySchema].[tmp_rg_xx_MyTable]', N'MyTable' |
|
| Back to top |
|
 |
chriskelly
Joined: 19 Apr 2010 Posts: 251 Location: Cambridge, UK
|
|
| Back to top |
|
 |
findtim
Joined: 18 Jan 2011 Posts: 8
|
Posted: Thu Mar 17, 2011 4:47 pm Post subject: What version should I be looking for? |
|
|
I am still seeing the issue. I removed all references to RedGate dlls in my project and re Added the references to these dlls:
RedGate.Shared.SQL 8.0.0.21
RedGate.Shared.Utils 8.0.0.21
RedGate.SQLCompare.Engine 8.2.1.7
Are those the version numbers you would expect after I added the patch? |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6344 Location: Red Gate Software
|
Posted: Thu Mar 17, 2011 5:56 pm Post subject: |
|
|
This fix is supposed to be in SQL Compare Engine 8.2.1.13, so your version falls a bit short of the mark. I suppose what you could do is get a copy of SQL Compare 8.5 from the website and copy all of the DLLs into your SDK references folder. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
findtim
Joined: 18 Jan 2011 Posts: 8
|
Posted: Fri Mar 18, 2011 6:22 pm Post subject: |
|
|
That sounds like a great solution, unfortunately RedGate has taken certain precautions in building your dlls so that the Engine dll from the compare tool itself does not expose any public interface like the SDK version does. When when I try this the Imports RedGate.SQLCompare.Engine statment tells me:
| Quote: |
| Namespace or type specified in the Imports 'RedGate.SQLCompare.Engine' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. |
Shared.Utils and Shared.SQL work fine.
Thoughts?
As was posted by chrisk5 - I did install the patch, but the versions of the assemblies did not change in the SDK directory. You can see the version number post install in my above post. And as I just layed out, I am not allowed to use the SQL Compare dlls it appears.
Are there any plans to rebuild the SDK with the necessary fixes and post and additional patch?
Thanks,
Tim |
|
| Back to top |
|
 |
findtim
Joined: 18 Jan 2011 Posts: 8
|
Posted: Mon Apr 18, 2011 4:41 pm Post subject: |
|
|
So am I to run with the impression that RedGate has stopped supporting SDK 8? This is a bug it needs to be fixed. You already have the code to fix it, but it has not been released.
Please release the code. It is really hard to sell a solution to management when there is a vendor bug that keeps it from working.
Thanks,
Tim |
|
| Back to top |
|
 |
|