script out a database (fully functional create script) ??

  • i know there's several ways to get the create scripts from your database, but

    is there a full-proof create script? just for the schema?

    any ideas, links would be helpful.

    thanks in advance.

  • The easiest is just to right click the database in Management Studio and select Tasks, Create Scripts, and go from there. Does that not do what you need?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Actually, I've discovered recently that that does not in fact script everything in the database. For instance there are no Service Broker objects on the list.

    Kind of disturbing, if you ask me.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • You could use a modeling tool like CA Erwin Data Modeler, or PowerDesigner DataArchitect. Both will let you reverse engineer your database and generate scripts. You can download a fully functional trial of either one (or both) if it's a one time deal. I use DataArchitect on an almost daily basis and have been quite pleased with it. It also lets you compare two schemas, and generate scripts to make them the same. They aren't cheap, however.

    If you're on a budget, and are familiar with Linux there is a free modeling tool you can use (sorry, the name escapes me). I had it loaded on Ubuntu at one time, but never used it.

  • rbarryyoung (5/6/2008)


    Actually, I've discovered recently that that does not in fact script everything in the database. For instance there are no Service Broker objects on the list.

    Kind of disturbing, if you ask me.

    There are other things missing from that kind of scripting, but since the original question here was "just the schema", I think it will suffice unto that need.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply