views:

201

answers:

1

Having a really tricky issue deploying a composite database solution from TFS to my local sql install.

I wonder if anyone can offer advice? Thanks

Composite database projects in Team Foundation Server. MarketRisk and MarketRisk_Structure. Both have references to another database called DataMirror.

MarketRisk_Structure contains a view vwLiveTrades which as scripted is:

SELECT     * FROM       [$(LSRV_ENQ)].[$(DataMirror)].dbo.AS400_Positions 

In MarketRisk_Structure project, there is a reference to DataMirror in the References, and also a variable in SQLCMDVARS for both DataMirror and LSRV_ENQ (a linked server).

On MarketRisk project, there is a reference to Datamirror in the References, and also a variable in SQLCMDVARS for both DataMirror and LSRV_ENQ (a linked server).

I think I need both the DataMirror ref and the LSRV_ENQ ref in both projects because sprocs in MarketRisk call out to the linked server, and views in MarketRisk_Structure call out to the linked server.

I don't know if it's this circular reference that would cause the below issue:

MarketRisk.dbschema(0,0)Error TSD00563: This deployment may encounter errors during execution because [dbo].[spRetrieveSingleIntraDayTradeFromLive] depends on [dbo].[vwLiveTrades].[OptionPremiumDueDate] and [dbo].[vwLiveTrades].[OptionPremiumDueDate] does not exist in the target database.

I get many many of these errors, all because of the spRetrieveSingleIntraDayTradeFromLive in MarketRisk trying to reference columns in the MarketRisk_Structure view.

MarketRisk.dbschema(0,0)Error TSD01234: Plan verification encountered errors; deployment cannot continue.
A: 

For anyone hitting this problem:

I resolved by explicitly naming all the columns in the view. Deployment didn't like the wildcard.

Also, needed to set the Target Database Name in the Deploy properties for the MarketRisk_Structure to be "MarketRisk".

Regards Graeme

Graeme