SQL Server Central is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

Script to obtain datadictionary from a SQL2000 db

By pattyd0319, 2001/08/27

Total article views: 2911 | Views in the last 30 days: 8

This script creates a stored procedure that, when executed, queries the system tables of any SQL2000 database to return a complete, ordered datadictionary. *Warning**This script only works on tables which have the description property filled out as my main purpose was to query the extended property description feature new to SQL2000. If you have not filled out any descriptions on your tables or columns, it will not return any data (try completing a couple of column descriptions to test it). Simply run the query in Query Analyzer (make sure you specify a database) to create the stored procedure. Then call the procedure by typing "exec datadictionary" to return an up to date datadictionary which can be quickly exported to Excel, Word, etc. Although it is preferred to use the schema views instead of the system tables, this is an easy way to view the table and column description extended properties which are new to SQL 2000. Be aware that when migrating to future versions of SQL, the system tables could change.

By pattyd0319, 2001/08/27

Total article views: 2911 | Views in the last 30 days: 8
Your response
 
 
Related tags
 
Already registered?  

Free registration required

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Register

E-mail address:
Password:
Password (confirm):

  

Subscriptions

We ask you to register on the site and subscribe to our newsletters. Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

We ask that you give the newsletter a try for a week. Over 200,000 SQL Server Professionals a day find it entertaining and useful. If not, you are welcome to unsubscribe at anytime.

Steve Jones
Editor, SQLServerCentral.com