Nupkg Package Size

shanejokeeffeshanejokeeffe Posts: 19 New member
edited December 24, 2013 6:35AM in Deployment Manager
Along with TeamCity, I'm trialling Deployment Manager and the SQL Automation Pack. For application building and deployment everything is going well but I'm having some issues with automating the database side of things.

I've installed the TeamCity plugin and I have a build step using the Red Gate runner that I've configured to Generate Upgrade Scripts and also Create a Database Package into Deployment Manager.

The issue I'm having is that the nupkg files begin generated as part of the database build step are pretty big at around 300Mb. There are a lot of objects in the database but given a minor changeset (one stored procedure change), I don't understand the size of the files. Am I setting this up correctly?

Regards,

Shane.

Comments

  • Hi Shane,

    Thanks for trying out Deployment Manager.

    The packages that we create for databases are not incremental; they don't just contain the changes, they contain a snapshot of the entire database state (including any static data you've defined). This allows the package to be used to update any version of the database to the appropriate state.

    There is more information about the way database deployments work in this page of the documentation
    Development Lead
    Redgate Software
  • Thanks for that Mike and I'm starting to make sense of it. So given the size of my database, I can just expect that size of package to remain fairly standard.

    Following on from that, does this mean that if I have deployed v1.1.10 to production, produce a number of test builds and then at a later date attempt to upgrade production directly to v1.1.20 that it will upgrade all of the bits in between?
  • That's right.
    Development Lead
    Redgate Software
  • Thanks for the quick answers Mike.

    I'm still curious as to why the size of the package is so large though.

    This database has roughly the following objects and I am not including any data in TFS:

    Tables: 200
    SPs: 700
    Triggers: 150
    Views: 100

    The Database folder generated by SQL Source Control into TFS is only 5Mb - why is the NuGet package over 300Mb?
  • If you've asked the TeamCity plugin to generate upgrade scripts, it will generate the appropriate SQL to upgrade from all deployed versions of the package to the latest state. This might mean that the package contains several different versions of the upgrade script.

    These scripts are only used for static upgrade mode, so if you're using dynamic upgrades you don't necessarily need to generate them.

    You can check the contents of the package file if you want; if you change the file extension from .nupkg to .zip, Windows Explorer will let you navigate into the package and see what files are included. That might help you work out why they're so big.
    Development Lead
    Redgate Software
  • Thanks for the tip.

    By looking in the package contents, I could see that in the state folders, all of the contents of the BuildCheckOut directory in TeamCity were being included. This build configuration also builds a number of .net applications so those files (binaries and all) were being added to the package.

    I changed the path in the Red Gate TeamCity plugin to not use the root path of my VCS setup and now the database package sizes are a much more manageable 2mb.

    Thanks again for the assistance!

    Shane.
Sign In or Register to comment.