Red Gate forums :: View topic - Deployment script causes Sql error
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

Deployment script causes Sql error

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
mdesousa



Joined: 18 Mar 2012
Posts: 12

PostPosted: Wed Sep 26, 2012 12:18 am    Post subject: Deployment script causes Sql error Reply with quote

I'm trying to execute a deployment script created by SQL Compare (10.2.0.777). The script throws this error while upgrading one of the tables: Either the parameter @objname is ambiguous or the claimed @objtype (INDEX) is wrong

This script is comparing a snapshot file against a SQL Azure database. After reviewing the script, I noticed the code below which drops the Charge table and then tries to rename its index.

PRINT N'Creating index [tmp_rg_xx_CIX_Charge_BillingCycle_Invoice] on [dbo].[tmp_rg_xx_Charge]'
GO
CREATE CLUSTERED INDEX [CIX_Charge_BillingCycle_Invoice] ON [dbo].[tmp_rg_xx_Charge] ([InvoiceId])
GO
INSERT INTO [dbo].[tmp_rg_xx_Charge]([ChargeId], [ChargeType], [BillableEventId], [ProcessedDate], [StartTime], [EndTime], [InvoiceId], [ProductId], [SubscriptionPackageProductId], [Quantity], [UnitId], [Price], [PriceAmount], [PriceCurrency], [ChargeAmount], [ChargeCurrency], [DiscountPromotionId], [Column001], [Column002], [Column003], [Column004], [Column005], [Column006], [Column007], [Column008], [Column009], [Column010], [Column011], [Column012], [Column013], [Column014], [Column015], [Column016], [Column017], [Column018], [Column019], [Column020]) SELECT [ChargeId], [ChargeType], [BillableEventId], [ProcessedDate], [StartTime], [EndTime], [InvoiceId], [ProductId], [SubscriptionPackageProductId], [Quantity], [UnitId], [Price], [PriceAmount], [PriceCurrency], [ChargeAmount], [ChargeCurrency], [ParentChargeId], [Column001], [Column002], [Column003], [Column004], [Column005], [Column006], [Column007], [Column008], [Column009], [Column010], [Column011], [Column012], [Column013], [Column014], [Column015], [Column016], [Column017], [Column018], [Column019], [Column020] FROM [dbo].[Charge]
GO
DROP TABLE [dbo].[Charge]
GO
EXEC sp_rename N'[dbo].[tmp_rg_xx_Charge]', N'Charge'
EXEC sp_rename N'[dbo].[Charge].[tmp_rg_xx_CIX_Charge_BillingCycle_Invoice]', N'CIX_Charge_BillingCycle_Invoice', N'INDEX'
GO
Back to top
View user's profile Send private message
mdesousa



Joined: 18 Mar 2012
Posts: 12

PostPosted: Wed Sep 26, 2012 2:08 am    Post subject: Reply with quote

Of course, a few minutes after submitting this realized that after the first rename statement we'll have a Charge table again. But, the second rename throws an error and I'm not sure why.

I also see this behavior when I run the comparison / deploy using the SQL Compare SDK.

Thanks
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Mon Oct 01, 2012 11:06 am    Post subject: Reply with quote

Is the SQL Compare command-line producing this script? If so, I may have a patch that could help.
Back to top
View user's profile Send private message
mdesousa



Joined: 18 Mar 2012
Posts: 12

PostPosted: Wed Dec 05, 2012 1:24 am    Post subject: Reply with quote

Hi Brian,

Sorry... I've just noticed your reply. We are running into the same issue again... if you have a patch, it would be very helpful. But this is happening with the SQL Compare SDK.. not the command-line.

Would your patch work?

Thanks
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Wed Dec 05, 2012 11:24 am    Post subject: Reply with quote

It was fixed in SQL Compare Engine 10.2.0.1529 as part of the bugfix for SC-5872, so presumably the latest command-line is fixed but there is no stable SDK build I can give you.
Back to top
View user's profile Send private message
mdesousa



Joined: 18 Mar 2012
Posts: 12

PostPosted: Wed Dec 05, 2012 2:13 pm    Post subject: Reply with quote

Ok, thanks. This issue is really impacting us and forcing us to go through some painful workarounds... is there a date when this fix will be available for the SDK?
Back to top
View user's profile Send private message
mdesousa



Joined: 18 Mar 2012
Posts: 12

PostPosted: Tue Jan 22, 2013 12:08 pm    Post subject: Reply with quote

Hi, still waiting for an updated version of the SDK that would address this problem that has already been fixed in SQL Compare 10. Is there a patch available at this time? Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group