SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Database Catalog
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

joldham
Wiseass Yak Posting Master

USA
300 Posts

Posted - 03/27/2002 :  08:33:46  Show Profile  Reply with Quote
I am trying to find out whether there is a extended procedure that will allow you to add a comment or desription on a table. I have searched BO and can't seem to find the info I am looking for.

For example, I have a table named Backorders and when I need to find out generally what information this table contains, I want to look at the description or comment like "This table contains all Backorders since May 15, 2001".

For the anyone with Oracle experience, I am looking for functionality similar to adding a comment to an Oracle table.

Jeremy

Nazim
A custom title

United Arab Emirates
1408 Posts

Posted - 03/27/2002 :  08:39:11  Show Profile  Reply with Quote
i dont think therez anything like that with Sql Server. And if it was there too am curious how would you see it ( with sql server most probably with sysobjects . and therez nothing like description column as of now in it, but who knows Yukon might contain one

--------------------------------------------------------------
Go to Top of Page

Jay99
Constraint Violating Yak Guru

USA
468 Posts

Posted - 03/27/2002 :  09:08:00  Show Profile  Reply with Quote
If it is that important, you could create a MYsystabledesc . . .

Jay
<O>
Go to Top of Page

joldham
Wiseass Yak Posting Master

USA
300 Posts

Posted - 03/27/2002 :  09:34:08  Show Profile  Reply with Quote
I figured I might have to create my own table and link it to the id column in sysobjects. Basically, we have a database that maintains historical data and right now, I am the only one that knows the exact information contained in all the tables. If I am gone, I need other users within a certain group to be able to get a general idea of what is in the table, in case they have to pull information. This will keep them from having to view each table's columns to determine if it is the table they want to use. I also need to use the same for SP and views.

Knowing that neither Nazim or Jay have seen anything like this, my guess is that it doesn't exists. Thanks for the quick reply guys.

Jeremy



Go to Top of Page

robvolk
Most Valuable Yak

USA
15655 Posts

Posted - 03/27/2002 :  11:16:07  Show Profile  Visit robvolk's Homepage  Reply with Quote
If you have Visio, or other software for database and entity-relationship design, they can reverse-engineer your database and build an E-R diagram for you. Then you can annotate this to your heart's content. If you really want to have full documentation on your database, this is the way to go. Adding a description table to your database is a convenience, but it's not a replacement for a full E-R diagram. Not to mention that a visual diagram of the database will be much easier and faster for others to understand.

Go to Top of Page

joldham
Wiseass Yak Posting Master

USA
300 Posts

Posted - 03/27/2002 :  12:29:29  Show Profile  Reply with Quote
Thanks for the advice robvolk.

For this particular database, E-R does not really exist. The database is used to store historical data that is usually unrelated. Basically instead of storing the information on individual access databases, we wanted a single database centrally located to access the information as needed. When new people are added and need to run queries against the database, I wanted to give them a head start on what information in contained in a table or view and what each SP is set up to accomplish, including any paramaters necessary. Around here, you are asked to do something and sometimes not given enough directions such as specifically which able I can find that information in.

Jeremy

I have posted the script I generated at the following: http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=14326




Go to Top of Page

davidpardoe
Constraint Violating Yak Guru

United Kingdom
324 Posts

Posted - 03/28/2002 :  06:04:46  Show Profile  Reply with Quote
I came across the undocumented system table SYSPROPERTIES when I was looking at column descriptions. I noticed that you can add these in Enterprise Manager - in Design Table there is a properties sheet for each column... I turned on a trace in SQL Profiler to see what happened when I added a description. Low and behold it updated the SYSPROPERTIES table.

The table is available in SQL Server 2000 and is used to stored extended properties for any object - you could definitely get a table description in here.

Check out the following for more help...

http://www.devx.com/premier/mgznarch/vbpj/2001/05may01/sq0501/sq0501.asp
(This article starts out by describing exactly what you are after - a table description)

http://www.swynk.com/friends/achigrik/UndocSQL2000Tbl.asp#part_2_8

============================
Chairman of
The NULL Appreciation Society
"Keep NULLs as NULL"
Go to Top of Page

joldham
Wiseass Yak Posting Master

USA
300 Posts

Posted - 03/28/2002 :  08:16:29  Show Profile  Reply with Quote
Thanks David. I actually found this yesterday about 2 minutes before I left work for the evening and before I could research it and post the results here. Good catch!

Jeremy

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000