Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

script out a database (fully functional create script) ?? Expand / Collapse
Author
Message
Posted Tuesday, May 6, 2008 2:22 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, June 25, 2008 7:37 AM
Points: 13, Visits: 52
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.
Post #495954
Posted Tuesday, May 6, 2008 2:35 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:58 AM
Points: 13,872, Visits: 9,600
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
Post #495962
Posted Tuesday, May 6, 2008 5:00 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, December 4, 2014 7:52 AM
Points: 9,294, Visits: 9,495
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.


-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #496005
Posted Tuesday, May 6, 2008 7:48 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, July 15, 2013 2:52 PM
Points: 89, Visits: 385
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.
Post #496027
Posted Wednesday, May 7, 2008 8:11 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:58 AM
Points: 13,872, Visits: 9,600
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
Post #496360
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse