server| Stored Procedures
--Get MS SQL version number
Execute master.. Sp_msgetversion
--Get Hard disk file information
--Parameter Description: directory name, directory depth, whether to display files
Execute master.. Xp_dirtree ' C: '
Execute master.. Xp_dirtree ' C: ', 1
Execute master.. Xp_dirtree ' C: ', 1,1
--Lists all OLE DB-provided programs installed on the server
Execute master.. Xp_enum_oledb_providers
--Lists all code pages installed on the server
Execute master.. Xp_enumcodepages
--Lists the DSN configured on the server
Execute master.. Xp_enumdsn
--Lists the SQL Server error log list, and then updates the time
Execute master.. Xp_enumerrorlogs
--List all Windows local groups on the server
Execute master.. Xp_enumgroups
--Detection of file existence
Execute master.. Xp_fileexist ' C:\a.bak '
DECLARE @flag int
EXEC master.. Xp_fileexist ' C:\abc.bak ', @flag out
If @flag =1
Begin
print ' exist '
End
Else
Begin
print ' no exist '
End
--Lists the fixed drives on the server and the free space for each drive
Execute master.. Xp_fixeddrives
--Gets the computer name of the current SQL Server server
Execute master.. Xp_getnetname
--List the details of the current error log
EXEC [Master]. [dbo]. [Xp_readerrorlog]
--Lists all the next subdirectories of the specified directory
EXEC [Master]. [dbo]. [Xp_subdirs] ' C:\WINNT '
---List the name of the drive
--Free space in bytes (low)
--Drive Type: Floppy (1), Hard drive (2), CD-ROM (8)
EXEC [Master]. [dbo]. [Xp_availablemedia]
--The effect is as follows:
Name low free high free media type
C:\ 1270386688 0 2
D:\ 1726824448 2 2
E:\ 875053056 10 2
F:\ 0 0 8
There are also in [master]. [dbo]. [sp_addlogin] Inside has the encryption function Pwdencrypt, everybody interested may try