[Q] Reverse Engineer All Objects - Database Project

Last post 11-06-2009 5:59 PM by jkard883. 2 replies.

Sort Posts:

  • [Q] Reverse Engineer All Objects - Database Project

    11-05-2009, 5:00 PM
    • Member
      2 point Member
    • jkard883
    • Member since 04-05-2007, 2:57 PM
    • Posts 13

    Hello All!

    I was put in charge of a database that has absolutely no build scripts or source code (no source control at all).

    Is there a way to extract all objects in the database to individual files (stored procedure create, table create, etc) into a Visual Studio database project so that I can deploy elsewhere if needed?

    I know you can do this (sort of) with the Script Wizard in Management Studio, but I'd like to create all the objects into individual files so I can add to source management.

    I dug around in VS 2005 and VS 2008 database projects, but didn't see off hand if it is possible.

    Thanks
    Jay

  • Re: [Q] Reverse Engineer All Objects - Database Project

    11-05-2009, 6:29 PM
    Answer
    • Member
      230 point Member
    • Ryan_A
    • Member since 10-28-2009, 12:06 AM
    • Rochester, NY
    • Posts 45

    I wish there was a simple solution to this but I'm 99% sure there is not.  I was in the same situation not too long ago and as a temporary solution I've exported every object type into its own file, i.e. CreateTables, CreateStoredProces, etc.  We are gradually moving items into their own files as we touch them to make updates.

    I just used the export functionality in Management Studio to take care of it, and the biggest issue I ran into while doing it was that it doesn't take dependencies into consideration when exporting Views.  I exported all my views, and if I tried to run the create script it generated, it would fail.  I had to re-order them all by hand to get it to work.



    Ryan Andreotta, MCPD
    http://www.rackwire.com
    Shared hosting from $4.99/month
    VPS from $22.00/month
  • Re: [Q] Reverse Engineer All Objects - Database Project

    11-06-2009, 5:59 PM
    • Member
      2 point Member
    • jkard883
    • Member since 04-05-2007, 2:57 PM
    • Posts 13

    Wow, that seems really strange!  All the functionality is basically there in VS, I thought this would be pretty easy, dang.  I just downloaded Visual Studio 2010 Beta 2, perhaps there is something in the newest version.

    Thanks
    Jay

Page 1 of 1 (3 items)