How to export database schema?
I'm running a developer SQL Server 2012 Express version on my PC. I've restored a sample .bak database to this server. How or is there a way to export out the database schema or how all of the tables are interconnected/linked together out?
May 22nd, 2012 8:07pm

hi,

you can generate the DDL of the objects in your database using SQL Server Management Studio... select your database node, rx click, "Tasks->Generate Script"... the "Generate and Publish script" wizard will prompt you... in the "Set Scripting Options" task, you can access the "Advanced" dialog, where you can interact a little on "how" the output will be generated..

as regards the "way" to understand how the objects are "interconnected", you can access the "Database Diagram" dialog... create a new one for your database, add all desired/required objects, and they will be "rendered" as objects on a window showing all relationships (in the meaning of SQL relationships) among them... this feature is not as powerfull as in full comercial tools like erWin or the like, but it's a nice one..

regards

Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2012 9:36pm

Hello,

It's pretty easy and quick: http://www.c-sharpcorner.com/UploadFile/e1317f/how-to-create-script-for-the-database-objects-in-sql-server-2008/

-Sean

May 22nd, 2012 9:36pm

You can also try this:

http://mycodepad.wordpress.com/2013/11/18/export-ms-sql-database-schema-with-c/

Free Windows Admin Tool Kit Click here and download it now
November 27th, 2013 2:09pm

Have you tired DAC? Try advanced settings. You can do it in SSMS.

December 10th, 2013 1:33am

You can import schema with Dataedo, you can then browse tables and relationships with application or export to PDF, HTML or Excel.
Free Windows Admin Tool Kit Click here and download it now
April 16th, 2015 6:49pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics