Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Quick Way to Build a Data Model from 3rd Party DB?

Author  Topic 

Todzilla
Starting Member

8 Posts

Posted - 2014-01-03 : 16:50:32
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

52326 Posts

Posted - 2014-01-04 : 05:16:46
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

8 Posts

Posted - 2014-01-06 : 13:50:49
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

52326 Posts

Posted - 2014-01-07 : 01:02:42
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
   

- Advertisement -