Undocumented Extended Stored Procedures

  • Greetings,

    Coming across a list of undocumented extended stored procedures I wonder, where the actual T-SQL code of them can be looked up?

    Here is the xp list:

    sp_MSgetversion

    xp_dirtree

    xp_enum_oledb_providers

    xp_enumcodepages

    xp_enumdsn

    xp_enumerrorlogs

    xp_enumgroups

    xp_fileexist

    xp_fixeddrives

    xp_getnetname

    xp_readerrorlog

    xp_regdeletekey

    xp_regdeletevalue

    xp_regread

    xp_regwrite

    xp_subdirs

    More info about them can be found at http://www.mssqlcity.com/Articles/Undoc/UndocExtSP.htm

  • You will not be able to see the code for these, unless someone has kindly disassembled the DLL that they are in, and placed them on the net.

    If anyone has any links, that would be nice 😀

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • Right, extended stored procedures are not coded in T-SQL, they are C/C++ code in a DLL and therefore as SilverFox has commented there is no T-SQL. I too would love to see some of the code for some of these.

    Also, a word of caution about using undocumented extended or regular stored procedures, there is no guarantee they will be in the next version or the next version will have backward compatible code..

    CEWII

  • Thank you for this very interesting knowledge sharing

    Just one more question: Do you guys actually know the names of the DLLs where the extended procedures "reside" in?

    Greetings,

    Mike

  • if you do sp_helptext and mention the extended stored procedure name you will get the DLL name as long as it isnt an internal extended stored procedure.

    sp_helptext ExtendedStoredProcedure

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • Thanks

    sp_helptext xp_dirtree --> xpstar90.dll

  • Most of those are pretty useless from SQL Server except for xp_RegRead and xp_DirTree. xp_RegWrite is usefull once in a lifetime. Explanations of what others have found are available through Google.

    If all you can find for xp_DirTree is two parameters, c'mon back and I'll fill you in. I'd do it right now but I'm stuck on a non SQL Server computer until Monday and I try not to write examples without actually testing them.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Used to love to write extended stored procedures. They're located in the binn folder, and the others are correct - they are either c or c++ .dlls built using the ODS API. I just blogged about them here so please go check it out if you have a moment...

Viewing 8 posts - 1 through 7 (of 7 total)

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