Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8246397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:29:41+00:00 2026-06-07T22:29:41+00:00

We have an automated build process via TFS, TFS database projects, and vsdbcmd. When

  • 0

We have an automated build process via TFS, TFS database projects, and vsdbcmd. When deploying the database project to our database server, the generated SQL script attempts to ‘ALTER’ certain stored procedures, even though those stored procedures do not net yet exist in the target database. Instead, the SQL script schould contain ‘CREATE’ statements for those stored procedures. This obviously causes the database deployment to fail, as there is no way to ‘ALTER’ a stored procedure that does not exist.

Does anyone have any ideas about what may be causing this, or how it can be fixed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T22:29:43+00:00Added an answer on June 7, 2026 at 10:29 pm

    Found out what was wrong:
    In TFS, the table definition did not have a schema prefix. So instead of (for example)

    CREATE TABLE [dbo][TableName]
    

    it was

    CREATE TABLE [TableName]
    

    The lack of a schema specified meant that when QA ran vsdbcmd, the schema assigned to the table was the default schema of the individual running vsdbcmd. So what was actually created was effectively as if we had specified:

    CREATE TABLE [QAUser_SCHEMA].[TableName]
    

    This caused vsdbcmd, when later run by another individual whose default schema was [dbo] to receive the error that we saw, basically generating an ALTER statement because the stored procedure had already been created, although under a different schema.

    One would think that even with the incorrect schema specified initially, that once the [dbo] schema was specified for the procedure that it would be considered a “different” procedure, however that was not the case. Dropping the original, version of the procedure (the one with the [QAUser_SCHEMA]), and then re-running vsdbcmd solved the problem.

    TLDR;
    Always prefix database objects in your database projects with a schema name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We would like to have our TFS automated CI build and test process use
Our project is held in a SourceSafe database. We have an automated build, which
We're transitioning to an automated build process for our iphone projects. These projects can
In our current database development evironment we have automated build procceses check all the
Here's my problem: we have an automated build process for our product. During the
I have an automated build process that I'd like to extend so I can
Our build process is fairly clean with the help of Team Foundation Server. We
I have an automated build process that runs when no one in is in
I have a automated (Visual Build) build process that runs: A set of automated
The Problem: In have a process that builds our executable. Before running the build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.