mdesousa
Joined: 18 Mar 2012 Posts: 12
|
Posted: Wed Sep 26, 2012 12:18 am Post subject: Deployment script causes Sql error |
|
|
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 |
|