FILE: Use Xpvmlog to Dump the Layout of Virtual Memory in SQL Server (279113)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)
  • Microsoft SQL Server, Standard Edition 7.0

This article was previously published under Q279113

SUMMARY

Understanding the virtual memory layout of a SQL Server 7.0 or SQL Server 2000 process space can help to understand memory leaks and virtual fragmentation that occur on the server. The xp_DumpVM extended stored procedure in the Xpvmlog component provides a way to dump the virtual memory layout of the SQL Server process.

MORE INFORMATION

The following file is available for download from the Microsoft Download Center:
The Xpvmlog.exe self-extracting executable contains the following files:

File nameSize
Readme.txt881B
Xpvmlog.dll296KB

The Readme.txt file describes how to install the extended stored procedure on SQL Server 7.0 or SQL Server 2000. The name of the extended stored procedure is xp_DumpVM. If you pass no arguments, the virtual memory dump (which is a text file) is dumped into the C:\Vmlog_*.log file. The file name will contain the date and time. You can specify a folder and a prefix for the log file. For example, the following command:

xp_DumpVM 'c:\logs\vmlog'

would generate a Vmlog_datetime.log file in the C:\Logs folder where datetime is the actual date and time.

A sample of some of the output is shown below. The output lists each VM region (address, type of memory, and size) and the blocks within each region.
00000000       Free          65536       
00010000       Private        4096      1  -RW-     
     00010000  Private        4096         -RW- --
00011000       Free          61440       
00020000       Private        4096      1  -RW-     
     00020000  Private        4096         -RW- --
00021000       Free          61440       
00030000       Private      524288      3  -RW-     Thread Stack
     00030000  Reserve      512000         -RW- --
     000AD000  Private        4096         -RW- G-
     000AE000  Private        8192         -RW- --
000B0000       Private     1048576      2  -RW-     Default Process Heap
     000B0000  Private      458752         -RW- --
     00120000  Reserve      589824         -RW- --
001B0000       Mapped        65536      2  -RW-     
     001B0000  Mapped         4096         -RW- --
     001B1000  Reserve       61440         -RW- --
001C0000       Mapped        90112      1  -R--     
     001C0000  Mapped        90112         -R-- --
001D6000       Free          40960       
001E0000       Mapped       192512      1  -R--     
     001E0000  Mapped       192512         -R-- --
0020F000       Free           4096       
00210000       Mapped       266240      1  -R--     
     00210000  Mapped       266240         -R-- --
00251000       Free          61440       
00260000       Mapped        16384      1  -R--     
     00260000  Mapped        16384         -R-- --
00264000       Free          49152       
00270000       Mapped       819200      4  ER--     
     00270000  Mapped        81920         ER-- --
     00284000  Reserve      704512         ER-- --
     00330000  Mapped         8192         ER-- --
     00332000  Reserve       24576         ER-- --
00338000       Free          32768     
...
				

REFERENCES

For more information about Windows Virtual Memory and the output above, see "Advanced Windows Third Edition", by Jeffrey Richter, ISBN 1-57231-548-2.

Modification Type:MinorLast Reviewed:8/9/2004
Keywords:kbdownload kbdownload kbDatabase kbinfo KB279113