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
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Data Map

Author  Topic 

tfgconsultant
Starting Member

7 Posts

Posted - 2012-09-12 : 10:36:49
I am working out of MS SQL 2008 R2. I wanted to create a data map for the databases and tables. What is the best way to accomplish this? Easiest most efficient way of course.

Thanks in advance.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-09-12 : 10:42:12
By "data map" do you mean a database diagram?
Go to Top of Page

tfgconsultant
Starting Member

7 Posts

Posted - 2012-09-12 : 10:51:06
Yes, data mapping in Excel spreadsheet or something that will map a db to a table. Kind of like a diagram I guess.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-09-12 : 10:56:33
Sounds like what you mean is a list of database names, table names, column names, data types and sizes?

Check the INFORMATION_SCHEMA.COLUMNS view:
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
Run that query in the database you wish to document, and copy the results into Excel. You can arrange/remove columns if needed.
Go to Top of Page

tfgconsultant
Starting Member

7 Posts

Posted - 2012-09-12 : 13:08:38
OK, I will check that out. Thanks!
Go to Top of Page
   

- Advertisement -