SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Quick Way to Build a Data Model from 3rd Party DB?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Todzilla
Starting Member

USA
8 Posts

Posted - 01/03/2014 :  16:50:32  Show Profile  Reply with Quote
Newbie here.

I'm going through a very tedious process of documenting tables and fields for a third party database, with an eye toward creating lots of SSRS Reports. I'm making progress, but I was wondering if there's a slick way to export all the tables, fields and key relationships.

Thanks in Advance,

Todzilla
Western Hemisphere
SQL 2008 R2 Noob

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 01/04/2014 :  05:16:46  Show Profile  Reply with Quote
you can write a query based on INFORMATION_SCHEMA catalog views for that
INFORMATION_SCHEMA.TABLES - will give you table information
INFORMATION_SCHEMA.COLUMNS- will give you column information
INFORMATION_SCHEMA.KEY_COLUMN_USAGE- will give you columns with keys information
INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE- will give you columns with defined constraints
INFORMATION_SCHEMA.TABLE_CONSTRAINTS - will give you tables with constraints defined

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

Todzilla
Starting Member

USA
8 Posts

Posted - 01/06/2014 :  13:50:49  Show Profile  Reply with Quote
Thanks, visakh16!

I will give that a try.

-Todzilla

Todzilla
Western Hemisphere
SQL 2008 R2 Noob
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 01/07/2014 :  01:02:42  Show Profile  Reply with Quote
Let me know if you need any more help

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000