Deployment script causes Sql error
mdesousa
Posts: 15
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
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
I also see this behavior when I run the comparison / deploy using the SQL Compare SDK.
Thanks
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