Deployment script causes Sql error

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

Deployment script causes Sql error

Postby mdesousa » Wed Sep 26, 2012 12:18 am

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
mdesousa
 
Posts: 12
Joined: Sun Mar 18, 2012 1:36 pm

Postby mdesousa » Wed Sep 26, 2012 2:08 am

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
mdesousa
 
Posts: 12
Joined: Sun Mar 18, 2012 1:36 pm

Postby Brian Donahue » Mon Oct 01, 2012 11:06 am

Is the SQL Compare command-line producing this script? If so, I may have a patch that could help.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby mdesousa » Wed Dec 05, 2012 1:24 am

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
mdesousa
 
Posts: 12
Joined: Sun Mar 18, 2012 1:36 pm

Postby Brian Donahue » Wed Dec 05, 2012 11:24 am

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby mdesousa » Wed Dec 05, 2012 2:13 pm

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?
mdesousa
 
Posts: 12
Joined: Sun Mar 18, 2012 1:36 pm

Postby mdesousa » Tue Jan 22, 2013 12:08 pm

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.
mdesousa
 
Posts: 12
Joined: Sun Mar 18, 2012 1:36 pm


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests