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 «««123

Document Your Database Expand / Collapse
Author
Message
Posted Wednesday, November 14, 2007 3:04 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, May 21, 2012 3:13 PM
Points: 516, Visits: 1,563
The query works for me in SqlServer 2000. What version do you have?

Steve



Post #422342
Posted Thursday, November 15, 2007 9:37 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, June 10, 2013 12:08 PM
Points: 35, Visits: 176
I'm using sql 2005

Do you by chance know how to access those objects in 2005?
Post #422712
Posted Thursday, November 15, 2007 10:17 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, May 21, 2012 3:13 PM
Points: 516, Visits: 1,563
I haven't started using 2005 yet, but I'm sure someone on the forum can help you.

Steve



Post #422732
Posted Thursday, November 15, 2007 11:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 16, 2007 8:42 AM
Points: 2, Visits: 2
Hi Kris,

this is the same query for SQL 2005:

select SO.name as 'table', SC.name as field,
ST.name as datatype, SC.max_length as 'size',
sp.value as 'description'
from sys.columns SC inner join
sys.objects SO on SC.object_id = SO.object_id inner join
sys.types ST on ST.user_type_id = SC.user_type_id left join
sys.extended_properties sp on sp.major_id = so.object_id and sp.minor_id = SC.column_id
and sp.name = 'MS_Description'
where SO.type = 'U'
order by SO.name, SC.name

Regarding your second question:
if i wanted to browse these tables, how would I access them?

Just go to DB -> Views -> System views

Hope it helps.

Regards,
Jose
Post #422747
Posted Thursday, November 15, 2007 2:54 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, June 10, 2013 12:08 PM
Points: 35, Visits: 176
Many thanks Jose

The script works and I found the views (I was looking under system tables before, never occurred to me to check the views)

thanks again

Kris
Post #422831
Posted Wednesday, January 2, 2008 9:11 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, August 1, 2014 9:56 AM
Points: 338, Visits: 1,422
I agree, I've gone to the effort of writing a Word macro template to document SQL-Server databases. You just select an ODBC data-source for a SQL server database and it will document all the tables, indexes, triggers, stored procedures and functions on the database. It's been well tested on sql-server 2005 but I think it should also run on 2000.

If anyone would like to try it please email me at:
dbdocument at gmail dot com. :)
Post #438025
Posted Wednesday, January 2, 2008 9:35 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 14, 2013 11:35 AM
Points: 4, Visits: 96
Great advice. However, I think a better article would be on the practice of creating "Self Documenting" database Schemas.
Post #438035
Posted Wednesday, January 2, 2008 11:15 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, February 6, 2014 12:59 PM
Points: 801, Visits: 1,962
brhunter (1/2/2008)
Great advice. However, I think a better article would be on the practice of creating "Self Documenting" database Schemas.

See Joe Celko's book "SQL Programming Style" ISBN:0-12-088797-5


ATB

Charles Kincaid

Post #438082
Posted Monday, May 2, 2011 11:44 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, May 3, 2011 11:25 AM
Points: 51, Visits: 175
Here is one more Free Tool to document Sql Server
Post #1101801
Posted Monday, May 2, 2011 11:48 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, May 3, 2011 11:25 AM
Points: 51, Visits: 175
Here is one more Free Tool to document Sql Server
Post #1101806
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse