Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Script to obtain datadictionary from a SQL2000 db

By Patty Dunbar,

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.

Total article views: 3093 | Views in the last 30 days: 1
 
Related Articles
FORUM

Where is place to store description of Columns?

Looking for table that storing information of column description

SCRIPT

Agent Job Schedule Description

Yet another schedule description query with added grammatical improvements.

FORUM

Generating Online Description for Stored Procedures

Generating Online Description for Stored Procedures

FORUM

Write Query Dynamic Generated Column

Write Query Dynamic Generated Column

FORUM

Stored procedure slower then query

Stored procedure slower then query

Tags
miscellaneous    
sqlinsider scripts    
t-sql    
 
Contribute