The update script doesn't contain any SQL statements. Skipping the update.

I'm using Team City and Octopus Deploy with DLM and recently my database developer started complaining that the deploys we were getting were incomplete. I synced a test database with our dev database, which is the target for the deployment, and I changed the test database (one stored proc) and checked it in. I can see the change in Team City's artifacts. I can see the change in the nuget package, and all indications show it gets sent to the target database server. When DLM runs against that package it succeeds, but the changes aren't there. Inspecting the logs I can see "The update script doesn't contain any SQL statements. Skipping the update." I have no idea what to check next. Can anyone give me some guidance?

Comments

  • Immediately after we add the database to SQL Source Control, we have done the Initial Commit. Once an initial commit is done, our database is in our version control system (be it TFS, GIT or any other VCS). At this point of time, both our database and the database in source control are identical. If we click on Get Latest, we won’t get any changes because both the databases are identical. Only if we modify the schema or data in our original database, then only SQL Control will detect the changes between the databases. In your case, you might not have done any changes to your database schema. That might be the reason why your Update.sql file is showing like below.
    /*
    This script is empty because the Target and Source schemas are identical.
    */
    My suggestion to make few modifications to your database schema, then try building the release package.
  • This is happening to me today.  I realize it's been 2 years, but here we are.  I'm using Octopus Deploy to deploy the database, other than that it seems to be very similar.

    Per Mohit's suggestions, I did verify changes were made, and checked in.  We have a step in team city that attempts to apply the changes directly to an empty database before sending it to Octopus.  All the changes are present in the empty database, but our development test and staging database, which both say they have been successfully updated, don't ever change.  We can use SQL Compare to see the differences and manually deploy, but our automated workflow, which has worked for over a year, is suddenly failing and the only thing I can point to right now is the message that says "The update script doesn't contain any SQL statements. Skipping the update. "  Any other ideas on what to check?
Sign In or Register to comment.