|
|
|
Mr 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
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Yesterday @ 7:55 AM
Points: 35,
Visits: 173
|
|
I'm using sql 2005
Do you by chance know how to access those objects in 2005?
|
|
|
|
|
Mr 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
|
|
|
|
|
Forum 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
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Yesterday @ 7:55 AM
Points: 35,
Visits: 173
|
|
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
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 9:15 AM
Points: 316,
Visits: 1,185
|
|
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. :)
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Yesterday @ 8:10 AM
Points: 4,
Visits: 93
|
|
Great advice. However, I think a better article would be on the practice of creating "Self Documenting" database Schemas.
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 9:18 AM
Points: 772,
Visits: 1,825
|
|
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
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Tuesday, May 03, 2011 11:25 AM
Points: 51,
Visits: 175
|
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Tuesday, May 03, 2011 11:25 AM
Points: 51,
Visits: 175
|
|
|
|
|