Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Visual Studio Database Projects and General Use

Visual Studio Database Projects and General Use

Scheduled Pinned Locked Moved Database
databasevisual-studiolearningcsharpsql-server
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cjb110
    wrote on last edited by
    #1

    We'd like to start using Database Projects to manage our SQL Server code in the same structured way we do the other code. We have a separate domain for development, and we also pass any changes to production to a third party. Is there a good resource (book, blog etc) on the day-to-day usage of these? One issue I've got at the moment is that the comparison result script is very protective (which is good). In my case its warning about tables that are being altered could contain data. Now I know that it doesn't matter as these are working tables, so it doesn't matter if they 'loose' data. Should I be taking the script and then altering it to suit the situation, or have I missed something earlier that would have made VS generate a better script? Also would people say that the comparison script is the best way to bring a database to the right version or is there a better way? Note the implementers have little to no understanding of the purpose of the database.

    M 1 Reply Last reply
    0
    • C cjb110

      We'd like to start using Database Projects to manage our SQL Server code in the same structured way we do the other code. We have a separate domain for development, and we also pass any changes to production to a third party. Is there a good resource (book, blog etc) on the day-to-day usage of these? One issue I've got at the moment is that the comparison result script is very protective (which is good). In my case its warning about tables that are being altered could contain data. Now I know that it doesn't matter as these are working tables, so it doesn't matter if they 'loose' data. Should I be taking the script and then altering it to suit the situation, or have I missed something earlier that would have made VS generate a better script? Also would people say that the comparison script is the best way to bring a database to the right version or is there a better way? Note the implementers have little to no understanding of the purpose of the database.

      M Offline
      M Offline
      Matt U
      wrote on last edited by
      #2

      We use them where I work to version stored procedures, permissions and other objects in source control. We also use the generated script(s) to deploy changes. The build process includes a task to compile the db project(s) and generate a diff script for the target environment, and then all the application files, SQL scripts, etc, are pushed to a staging folder on the network, ready for deployment. I personally alter the generated scripts when I come across the warnings of existing data being lost. However, I don't know if that's standard/best practice or not - that's just how I've always done it.

      djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.

      C 1 Reply Last reply
      0
      • M Matt U

        We use them where I work to version stored procedures, permissions and other objects in source control. We also use the generated script(s) to deploy changes. The build process includes a task to compile the db project(s) and generate a diff script for the target environment, and then all the application files, SQL scripts, etc, are pushed to a staging folder on the network, ready for deployment. I personally alter the generated scripts when I come across the warnings of existing data being lost. However, I don't know if that's standard/best practice or not - that's just how I've always done it.

        djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.

        C Offline
        C Offline
        cjb110
        wrote on last edited by
        #3

        Thanks for that, this is what I'm thinking will be the case too. VS can't *know* everything, so it makes sense that manual alteration of the diff scripts is required.

        M 1 Reply Last reply
        0
        • C cjb110

          Thanks for that, this is what I'm thinking will be the case too. VS can't *know* everything, so it makes sense that manual alteration of the diff scripts is required.

          M Offline
          M Offline
          Matt U
          wrote on last edited by
          #4

          Right. It can be a bit tedious. I've been working on a project for a few months, an existing application. The new enhancements/features required that we split some existing tables out (moving a field from one table to a new table). When setting up the deployment, I had to alter the generated diff scripts quite a bit.

          djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups