Click here to Skip to main content
13,349,293 members (62,130 online)
Click here to Skip to main content
Add your own
alternative version


43 bookmarked
Posted 20 May 2008

Schema Generator

, 3 Jun 2008
Rate this:
Please Sign up or sign in to vote.
Utility to generate schema description from existing SQL Server databases.


In this article, I am introducing a small utility developed for the purpose of extracting schema from existing SQL Server databases. The basic idea behind developing this utility is to emit the database schema from an existing SQL Server database. From a developer perspective, it is sometimes very much handy to quickly take a printout of the database structure for creating the UI layout or to specify some validation rules. If the database structure is available in printable format, then it will serve the purpose of robust programming and effective UI layout, because the developer can establish spontaneity between the database structure and the UI elements. So now, let's start exploring the utility in a little depth.

After extracting the binary distribution, you will find the executable SchemaGenerator.exe. Start the utility from SchemaGenerator.exe.

The first screen will be as follows:


The screen shown above asks the input for:

  • Server/instance name: This will be server\instance name. If not specified, it will default to (local).
  • Database name: This is a required input and must specify an existing database.
  • Username/Password: Optional, provide in case of non trusted connections.

Now, fill the server/instance name, i.e., (local)\SQLEXPRESS.


Click Generate to produce the report in printable format. The report will be rendered in preview, where we can see the generated schema output, then print, if required.

The print preview window outputs the database structure in printable format, and you can review the format and print it.


I hope this will help some needful developer and avoid duplication of efforts.

“Happy computing!”


  • Initial revision 1.0 - May 20 2008
  • Uploaded initial revision.

  • Revision 1.1 - June 04 2008
  • Updated for a new feature for using explicit username and password, in non trusted environments (requested by users).

  • Revision 1.2 - June 05 2008
  • Fixed the issue of printing reports from the Print Preview dialog (requested by users).


This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


About the Author

Ashutosh Phoujdar
Architect Infosys Technologies Ltd.
India India
An Software Architect having work experience of 8+ years in Architecture, Design and Development of Enterprise class application for Analytic s and Business Intelligence. Having hands-on experience primarily in Microsoft Technology Stack including(but not limited to) .NET, SQL Server, SharePoint Server, Biztalk, Withal know to program in Java, Perl and Shell. Currently working as Product Technical Architect in Infosys Technologies Ltd. Products R&D division. He has worked on development of best in class Supply Chain Optimization System and Spend Classification Software for optimizing indirect spend. An avid programmer by heart and passionate for solving any challenging and complex business problems. He is advocate of Open source and love to share solutions with open source communities like
1.Stack Overflow
2. nHibernate

Award's :
Prize winner in Competition "Best article of May 2008"

Articles :
Click to see my CodeProject Articles

Open Source Contributions:
Click to see my Open Source Project

Blog :
Share a solution | Explore the .NET world

Link'd :
LinkedIn Profile

His Favorite(s) :
nHibernate - The best ORM.
nHibernate Contributed Tools

You may also be interested in...

Comments and Discussions

QuestionWith 'sa' password? Pin
pvatanpour27-May-08 20:59
memberpvatanpour27-May-08 20:59 
AnswerRe: With 'sa' password? Pin
dnpro30-May-08 4:30
memberdnpro30-May-08 4:30 
AnswerRe: With 'sa' password? Pin
dnpro3-Jun-08 23:18
memberdnpro3-Jun-08 23:18 
GeneralAwsome! Pin
pvatanpour5-Jun-08 11:06
memberpvatanpour5-Jun-08 11:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180111.1 | Last Updated 4 Jun 2008
Article Copyright 2008 by Ashutosh Phoujdar
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid