Default parameters in stored procedures

  • Dear people,

    I have a following question:

    How it is possible to find out which of the stored procedures in database

    have parameters that are set to some default value.

    This information is not accessible nor thru sp_stored_procedures, nor

    sp_help 'stored procedure name', nor querying INFORMATION_SCHEMA.PARAMETERS.

    version: SQL Server 2000

    Any help will be greatly appreciated.

  • I think you'd have to pull the text out of syscomments and parse it. An alternative might be to leverage an ado command object, use the parameters.refresh method, see if pulls in the default.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Here this script should help http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=333

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • Thanks a lot Andy Warren and Antares686!

    That's what I did, I pulled stored procedures names, text from sysobjects

    and syscomments,

    inserted into table with shorter column (SET ANSI_WARNINGS OFF) so I got

    rows just with the beginning off stored procedure. Not so smart but worked.

    I'll test your ways, today.

    By the way Andy I love your articles.

    There are very informative and helpful.

    Thanks again.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply