Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Using T-SQL or SQL script can we create a data dictionary Expand / Collapse
Author
Message
Posted Monday, October 6, 2008 2:15 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 15, 2008 4:31 PM
Points: 3, Visits: 6
Hello:

Is it possible to create a data dictionary for all the tables in a SQL database using a SQL script or T-SQL ??
Any ideas are welcome.

Thanks.
Post #581362
Posted Monday, October 6, 2008 2:18 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:44 PM
Points: 10,260, Visits: 13,229
Sure it is possible. You could use the information_schema and sys views.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #581365
Posted Monday, October 6, 2008 6:57 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, May 9, 2013 8:07 AM
Points: 1,220, Visits: 2,614
Here is what I use to create a data dictionary using T-SQL.

http://www.mssqltips.com/tip.asp?tip=1499


Ken Simmons
http://twitter.com/KenSimmons
Post #581457
Posted Tuesday, November 30, 2010 4:04 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 3:53 PM
Points: 5, Visits: 47
Here is part of what I do...

CREATE VIEW [dbo].[DataDictonary]  AS 
SELECT schemas.name AS SchemaName
,all_objects.name AS TableName
,syscolumns.id AS ColumnId
,syscolumns.name AS ColumnName
,systypes.name AS DataType
,syscolumns.length AS CharacterMaximumLength
,sysproperties.[value] AS ColumnDescription
,syscomments.TEXT AS ColumnDefault
,syscolumns.isnullable AS IsNullable
FROM syscolumns
INNER JOIN sys.systypes ON syscolumns.xtype = systypes.xtype
LEFT JOIN sys.all_objects ON syscolumns.id = all_objects.[object_id]
LEFT OUTER JOIN sys.extended_properties AS sysproperties ON (sysproperties.minor_id = syscolumns.colid AND sysproperties.major_id = syscolumns.id)
LEFT OUTER JOIN sys.syscomments ON syscolumns.cdefault = syscomments.id
LEFT OUTER JOIN sys.schemas ON schemas.[schema_id] = all_objects.[schema_id]
WHERE syscolumns.id IN (SELECT id
FROM sysobjects
WHERE xtype = 'U')
AND (systypes.name <> 'sysname')
Post #1028329
Posted Thursday, May 1, 2014 12:54 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 19, 2014 5:29 PM
Points: 1, Visits: 11
I use http://www.sqldatadictionary.com/ .
Post #1566641
Posted Monday, June 16, 2014 10:08 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, June 16, 2014 11:30 PM
Points: 2, Visits: 1
Hi,

Please let me know the free download version from this site will work how many days and what are limitations?
Post #1582012
Posted Monday, June 16, 2014 11:30 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, June 16, 2014 11:30 PM
Points: 2, Visits: 1
Bruce Dunwiddie (5/1/2014)
I use http://www.sqldatadictionary.com/ .



Hi,

Please let me know the free download version from this site will work how many days and what are limitations?
Post #1582029
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse