Undocumented Extended Stored Procedures

xp_dirtree
Get a list of folders under the named folder.
EXEC master..xp_dirtree 'F:\DATA'

xp_enum_oledb_providers
List all OLE DB providers available.
EXEC master..xp_enum_oledb_providers

sp_MSgetversion
To get the current MS SQL Server version.
EXEC master..sp_MSgetversion

xp_enumcodepages
List all code pages and character sets.
EXEC master..xp_enumcodepages

xp_enumerrorlogs
Returns a list of all error logs with their last change date.
EXEC master..xp_enumerrorlogs

xp_enumdsn
List all System DSNs and their descriptions.
EXEC master..xp_enumdsn

xp_readerrorlog
Returns the contents of the error log.
EXEC master..xp_readerrorlog

xp_fixeddrives
List all hard drives and available disk space in Mb.
EXEC master..xp_fixeddrives

xp_getnetname
Get host WINS name.
EXEC master..xp_getnetname

xp_enumgroups
Return a list of NT user groups and their description.
EXEC master..xp_enumgroups

xp_fileexist
Check to see if a file exists.
EXEC master..xp_fileexist 'F:\DATA\my.log'

xp_regdeletekey
Delete a registry key.
EXEC master..xp_regdeletekey
@rootkey='HKEY_LOCAL_MACHINE',
@key='SOFTWARE\Microsoft'

xp_regdeletevalue
Delete a registry key value.
EXEC master..xp_regdeletevalue
@rootkey='HKEY_LOCAL_MACHINE',
@key='SOFTWARE\Microsoft',
@value_name='MSSQL'

xp_regread
Read a registry key.
DECLARE @test varchar(20)
EXEC master..xp_regread @rootkey='HKEY_LOCAL_MACHINE',
@key='SOFTWARE\Microsoft',
@value_name='MSSQL',
@value=@test 80
SELECT @test

xp_regwrite
Write a registry key.
EXEC master..xp_regwrite
@rootkey='HKEY_LOCAL_MACHINE',
@key='SOFTWARE\Microsoft',
@value_name='MSSQL',
@type='REG_SZ',
@value='NEW'

Posted December 14, 2006 | Filed under SQL Server Tutorials [permalink]

Leave a Reply

You must be logged in to post a comment.


News Categories

Tutorials and Docs

Sponsors

Syndicate DBA Place

Search

Archives

September 2010
M T W T F S S
« Jan    
 12345
6789101112
13141516171819
20212223242526
27282930  

Sponsors

27 queries. 0.146 seconds