• it's in the comments of hte proc:

    --#############################################################################

    --if you are going to put this in MASTER, and want it to be able to query

    --each database's sys.indexes, you MUST mark it as a system procedure:

    --EXECUTE sp_ms_marksystemobject 'sp_GetDDL2'

    --#############################################################################

    for SQL 2000, i'm not sure that proc exists...you can do it this way also:

    --Turn system object marking on

    EXEC master.dbo.sp_MS_upd_sysobj_category 1

    GO

    CREATE PROCEDURE sp_GETDDL2 AS ....

    GO

    --Turn system object marking off

    EXEC master.dbo.sp_MS_upd_sysobj_category 2

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!