Click here to Skip to main content
Email Password   helpLost your password?

Introduction

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:

Clipboard01n.gif

The screen shown above asks the input for:

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

Clipboard02n.gif

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.

Clipboard03small.GIF

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

“Happy computing!”

History

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
Generalok article
Donsw
8:56 21 Feb '09  
you might want to show what issues difficulties or things you learned in doing this program so others can learn. The program is nice but help others.

cheers,
Donsw
My Recent Article : Optimistic Concurrency with C# using the IOC and DI Design Patterns

GeneralRe: ok article
dnpro
20:06 22 Feb '09  
Much appreciated. I will include details on the difficulties during implementation Smile


GeneralPrint only one blank page
Edward111
7:43 4 Jun '08  
Great utility,
when I try to get a printout I only get one black page, my DB is about 23 pages report.

Can you give me an idea what is wrong.

thanks, you have my 5.
GeneralRe: Print only one blank page
dnpro
2:40 5 Jun '08  
Sure,

Please let me investigate this issue.

dnpro

GeneralRe: Print only one blank page
dnpro
4:30 5 Jun '08  
I found the issue in printing the reports. It was related to resetting the line counter variable. I fixed this issue, Now the utility is working fine.

Please accept my apologies, for inconvenience being caused to you. Smile

dnpro

GeneralRe: Print only one blank page
Edward111
13:40 5 Jun '08  
thanks for your help,

I have another question.

how can I get tables sorted?

thanks in advance for your help & time.

Edward
GeneralRe: Print only one blank page
dnpro
23:50 5 Jun '08  
Hi Edward,

I added the funcationality for sorting by table names.

Please use the Sort by Table name Option for generating the report in sorted order.

Thanks, for giving nice idea's to enhance the utility. Smile

dnpro

QuestionWith 'sa' password?
pvatanpour
20:59 27 May '08  
I have problem to fix your code with user id and password;

here is my connection string;
"ALALAM-5A3D50A5\\SQLEXPRESS;Initial Catalog=IBCorpDB;User ID=sa;Password=P@ssw0rd;"

Please help me,

Pouya

AnswerRe: With 'sa' password?
dnpro
4:30 30 May '08  
Hi Pouya,

I had initially designed this utility to work for Trusted Connections only. Smile

Sure I will leveraged the utility to prompt for user id and password also.

Thanks for nice suggestion. Smile

dnpro

AnswerRe: With 'sa' password?
dnpro
23:18 3 Jun '08  
Hi Pouya,

I have implemented feature, for specifying username and password.
Now, you can use with inputs like :

Server/Instance: ALALAM-5A3D50A5\SQLEXPRESS
Database=IBCorpDB
Username=sa
Password=P@ssw0rd

Please let me know for any queries/suggestion. Smile

dnpro

GeneralAwsome!
pvatanpour
11:06 5 Jun '08  
Your're so nice Smile , Really thanks for your support

Pouya

GeneralMS Visio
Gautam Sharma
23:21 25 May '08  
The feature of generating data dictionary and schema is available in MS Visio architect edition.

but for instant purpose your artical is good

Happy coding

General[Message Removed]
Mojtaba Vali
1:54 25 May '08  
Spam message removed
GeneralVery nice, simple and useful for a trusted connection.
Buddy Stein
7:33 20 May '08  
Smile Very nice, simple and useful for a trusted connection.

Buddy Stein
GeneralNeed correction before approve
Abhijit Jana
3:03 20 May '08  
Hi Ashu,
Please check your formatting before approve this article.

Best Regards -----------------
Abhijit Jana Check Out My Latest Article

Java.NET : Integration of Java and .NET[^]
"Success is Journey it's not a destination"

GeneralRe: Need correction before approve
ashu fouzdar
6:41 20 May '08  
Hi Abhi,

Can you please give me small hint, where i need to correct the formatting.
Please help me, I am just newbie in posting article on codeproject. Smile

Thanks
ashu fouzdar

ashu fouzdar
.NET Consultant

GeneralRe: Need correction before approve
Abhijit Jana
20:18 20 May '08  
your article margine was out of page .

but Its looks greate now..
good job....

5 from me Smile

Best Regards -----------------
Abhijit Jana Check Out My Latest Article

Java.NET : Integration of Java and .NET[^]
"Success is Journey it's not a destination"


Last Updated 4 Jun 2008 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010