اشتراک‌ها
مستند سازی Database

dbdescis a powerful tool to help you document your databases. It can produce detailed documents describing your databases

Currently dbdesc supports the following databases:
SQL Server 2000, 2005, 2008, 2008 R2, 2012, 2014
Microsoft Desktop Engine 2000 (MSDE) and SQL Server Express editions
MySQL 5.0
Oracle 9 and above
Microsoft Access 97 and above
Firebird 

با استفاده از کوئری زیر نیز می‌توانید نام و Description ستون‌ها و دیتاتایپ و ... آنها را بدست آورید.


 SELECT p.name
 ,p.value
 ,t.name AS TableName
 ,c.name AS ColumnName
 ,c.is_nullable
 ,c.max_length
 ,TYPE_NAME(c.system_type_id)
FROM sys.tables t
JOIN sys.columns c
ON t.object_id = c.object_id
LEFT JOIN sys.extended_properties p
ON p.major_id = t.object_id
AND p.minor_id = c.column_id
ORDER BY t.name DESC,c.name DESC

جهت بررسی بیشتر و آشنایی با Extended Properties in SQL Server به لینک Towards the Self-Documenting SQL Server Database  مراجعه کنید.

مستند سازی Database