Sunday, February 19, 2012

Documenting SQL Tables

Is there a documenting tool for tables on SQL Server 2000?
Depends a bit on what documenting you intend to do....
Visio has a option to "reverse engineer" a database, but I'm not sure if
that's what you mean...?
Lee-Z
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:77FFE09C-F395-4FCD-B1C6-A643070103B7@.microsoft.com...
> Is there a documenting tool for tables on SQL Server 2000?
|||I need to document the "Table Name", "Column Name", "Data Type", "Size",
"Lee-Z" wrote:

> Depends a bit on what documenting you intend to do....
> Visio has a option to "reverse engineer" a database, but I'm not sure if
> that's what you mean...?
> Lee-Z
> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:77FFE09C-F395-4FCD-B1C6-A643070103B7@.microsoft.com...
>
>
|||Try something like
select a.name [Table],
b.name [Column],
b.xusertype [Type],
b.length [Length]
from sysobjects a joine syscolumns b on b.id=a.id
order by a.name,b.colorder, b.name
Or you could generate a SQL script for the DDL in the 'All Tasks' path
through enterprise manager.
Joseph R.P. Maloney, CSP,CCP,CDP
"Chris" wrote:
[vbcol=seagreen]
> I need to document the "Table Name", "Column Name", "Data Type", "Size",
> "Lee-Z" wrote:
|||On Fri, 12 Aug 2005 04:18:12 -0700, "Chris"
<Chris@.discussions.microsoft.com> wrote:
>Is there a documenting tool for tables on SQL Server 2000?
Look up Information_schema in BOL.
Also various sp_help SPs, like sp_helpindex.
J.
|||On Fri, 12 Aug 2005 04:18:12 -0700, "Chris"
<Chris@.discussions.microsoft.com> wrote:
>Is there a documenting tool for tables on SQL Server 2000?
Also, the diagrams facility in Enterprise Manager!
J.
|||Hi,
All the extended properties will be stored in "sysproperties" system table
of each database.
Eg:
CREATE table test (id int , name char (20))
go
EXEC sp_addextendedproperty 'caption', 'Employee ID', 'user', dbo,
'table', 'test', 'column', id
go
EXEC sp_addextendedproperty 'caption', 'Employee Name', 'user', dbo,
'table', 'test', 'column', name
go
select * from sysproperties where object_name(id)='test'
Instead of querying the system tables use the below code using functions to
get the extended properties,
SELECT * FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table',
'test', 'column', default)
APEXSQL had got a very good tool for documentation.
http://www.apexsql.com/sql_tools_doc.asp
Thanks
Hari
SQL Server MVP
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:77FFE09C-F395-4FCD-B1C6-A643070103B7@.microsoft.com...
> Is there a documenting tool for tables on SQL Server 2000?
|||Hello,
I've created a free tool for this. You can find it at
http://sydi.sourceforge.net, it can create documentation in MS Word and XML.
The tool for SQL is SYDI-SQL, on the page there are also tools for
documenting Windows servers and MS Exchange.
Best regards
Patrick Ogenstad
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:ugvQXg2nFHA.1996@.TK2MSFTNGP10.phx.gbl...
> Hi,
> All the extended properties will be stored in "sysproperties" system table
> of each database.
> Eg:
> CREATE table test (id int , name char (20))
> go
> EXEC sp_addextendedproperty 'caption', 'Employee ID', 'user', dbo,
> 'table', 'test', 'column', id
> go
> EXEC sp_addextendedproperty 'caption', 'Employee Name', 'user', dbo,
> 'table', 'test', 'column', name
> go
> select * from sysproperties where object_name(id)='test'
>
> Instead of querying the system tables use the below code using functions
to
> get the extended properties,
>
> SELECT * FROM ::fn_listextendedproperty (NULL, 'user', 'dbo',
'table',
> 'test', 'column', default)
>
> APEXSQL had got a very good tool for documentation.
>
> http://www.apexsql.com/sql_tools_doc.asp
>
> Thanks
> Hari
> SQL Server MVP
>
> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:77FFE09C-F395-4FCD-B1C6-A643070103B7@.microsoft.com...
>

No comments:

Post a Comment