Dependency Issue With New Stored Proc and Altered View

CraigEddyCraigEddy Posts: 36 Bronze 3
edited March 23, 2016 2:19PM in SQL Compare 11
Here's our situation:

We use SQL Source Control to source control our database(s). We use SQL Compare command line to generate a deployment script for us to update test and other databases. We're having dependency issues in the following specific case (note that I am using SQL Compare professional v. 11.5.3.659 and have the same issue with previous versions):

We have an existing view to which we add a column. We create a new stored procedure which references the view (and the new column).

When we perform SQL Compare between the scripts folders containing these changes and a database which has the old version of the view and does not have the stored procedure, the deployment script outputs the CREATE PROC first, and then later outputs the ALTER VIEW. The script fails when executed with roughly the following error:

Invalid column name 'InitiativeSortOrder'.
Error executing the following SQL: CREATE PROCEDURE [PROGRAMS].[UpdateTDMProgramBudgetFromLegacyScenarioUnit]


Please advise on best practices or potential workarounds for this issue. We are in the process of automating our database release management using DLM Automation, after several years of success with SQL Source Control and SQL Compare in a slightly less-automated environment.

Thanks,
Craig Eddy
eddycr at state.gov

Comments

  • Hi Craig,

    Thanks for your inquiry, and sorry to hear about your issue. This issue will require further research and investigation, which will require work through a Support ticket. We have opened a Support ticket for you, and will be working/contacting you through this ticket.

    Thanks!

    Rick
    Ricky Ram
    Technical Support
    Red Gate Software Ltd.
Sign In or Register to comment.