Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was looking for a way to generate object definition (in my case stored procedure defintion) in SQL 2000 like I can get in SQL 2005 : select definition from sys.all_sql_modules.

share|improve this question
up vote 1 down vote accepted

One place the text is available in SQL2000 is sys.syscmoments.

The text in each row is limited to 4000 characters, so there will be more than one row for larger objects. In this case the colid column identifies the order of the rows (1 being the first chunk, 2 the second, and so on). For instance sp_WhoIsActive in the master database is long enough to have many rows in syscomments.

share|improve this answer
Thanks, syscomments is exactly what i was looking for. – Paul Dec 2 '09 at 10:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.