Deployment script causes Sql error

mdesousamdesousa Posts: 15
edited January 22, 2013 6:08AM in SQL Compare Previous Versions
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

Comments

  • 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
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Is the SQL Compare command-line producing this script? If so, I may have a patch that could help.
  • 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
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
  • 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?
  • 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.
Sign In or Register to comment.