4G内存的数据库服务器,当物理内存达到2G的时候,SQL2000的服务就自动停止了
                                                                          
Computer type is AT/AT COMPATIBLE.                                             
Bios Version is DELL   - 1                                                     
Phoenix ROM BIOS PLUS Version 1.10 2.3.1                                       
Current time is 21:22:16 04/29/10.                                             
8 Intel x86 level 6, 1995 Mhz processor(s).                                    
Windows NT 5.2 Build 3790 CSD Service Pack 2.                                  
                          
                                                     
Memory                    
MemoryLoad = 56%          
Total Physical = 4090 MB   
Available Physical = 1787 MB                        
Total Page File = 5969 MB  
Available Page File = 3849 MB                       
Total Virtual = 2047 MB    
Available Virtual = 5 MB 从以上的数据分析物理内存的使用率为56%,但是虚拟内存差不多已经用完了
为什么物理内存还没有完全用完,就启用虚拟内存了呢?
每次自动停止,出现的错误如下:
***Unable to get thread context for spid 60
2010-04-29 21:22:18.34 server    CImageHelper::Init () Failed load of dbghelp.dll - 存储空间不足,无法处理此命令。***Unable to get thread context for spid 61
2010-04-29 21:22:18.35 server    CImageHelper::Init () Failed load of dbghelp.dll - 存储空间不足,无法处理此命令。***Unable to get thread context for spid 62
2010-04-29 21:22:18.37 server    CImageHelper::Init () Failed load of dbghelp.dll - 存储空间不足,无法处理此命令。***Unable to get thread context for spid 65
2010-04-29 21:22:18.39 server    CImageHelper::Init () Failed load of dbghelp.dll - 存储空间不足,无法处理此命令。***Unable to get thread context for spid 68
2010-04-29 21:22:18.39 server    CImageHelper::Init () Failed load of dbghelp.dll - 存储空间不足,无法处理此命令。***Unable to get thread context for spid 69
2010-04-29 21:22:18.42 server    CImageHelper::Init () Failed load of dbghelp.dll - 存储空间不足,无法处理此命令。***Unable to get thread context for spid 70
2010-04-29 21:22:18.46 server    CImageHelper::Init () Failed load of dbghelp.dll - 存储空间不足,无法处理此命令。***Unable to get thread context for spid 71
2010-04-29 21:22:18.48 server    CImageHelper::Init () Failed load of dbghelp.dll - 存储空间不足,无法处理此命令。***Unable to get thread context for spid 72
2010-04-29 21:22:18.50 server    CImageHelper::Init () Failed load of dbghelp.dll - 存储空间不足,无法处理此命令。***Unable to get thread context for spid 74
2010-04-29 21:22:22.35 server    Stack Signature for the dump is 0x82395804
2010-04-29 21:22:22.35 server    SQL Server 将终止。发生了严重的异常 c0000005。

解决方案 »

  1.   

    1。修改boot.ini文件
    [boot loader]timeout=30default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /noexecute=optout /fastdetect /PAE2。启用锁定内存页选项
    (windows)
    启用锁定内存页选项在"开始"菜单上单击"运行"子菜单,然后在"打开"框中键入"gpedit.msc"。在"组策略"控制台上,展开"计算机配置",然后展开"Windows 设置"。展开"安全设置",然后展开"本地策略"。选择"用户权限分配"复选框。详细资料窗格中随即显示出策略。在详细资料窗格中,双击"锁定内存页"。在"本地安全策略设置"对话框中,单击"添加"按钮。在"选择用户或组"对话框中,添加有权运行 sqlservr.exe 的帐户。3。启用sql server 2000的AWE支持
    sp_configure 'show advanced options', 1RECONFIGUREGOsp_configure 'awe enabled', 1RECONFIGUREGOsp_configure 'max server memory', 6144RECONFIGUREGO这个做了吗
      

  2.   

    ---SQL Server对大容量内存的支持
    32位操作系统有个很大的缺陷,应用程序无法访问大于4G的进程地址空间,因为32位的指针无法保存大于4G的地址空间
    如果大于4G,则需要使用地址窗口化扩展插件(AWE),具体操作如下:
    1,启动物理地址扩展
    (1)找到C:\boot.ini,并删除其只读属性.
    (2)编辑boot.ini,在ARC路径中添加/PAE参数.例如:
    在windows Server 2003 Enterprise Edition 中,编辑后的ARC路径如下:
    muti(0)disk(0)partition(1)windows="windows Server 2003 Enterprise,Edition"/fastdetect/PAE
    保存后将其恢复为只读模式,然后重新启动计算机。如果计算机上的可用物理内存超过16G,应确保boot.ini文件中没有/3gb参数---如何启动AWE选项
    sp_configure'show advanced options',1
    reconfigure
    go
    sp_configue 'awe enabled',1
    reconfigure
    go
    ---手动配置内存选项
    sp_configure'show advanced options',1
    go
    reconfigure
    go
    sp_configure 'min server memory' --服务器最小内存
    sp_configure 'max server memory' --服务器最大内存
    sp_configure 'index create memory'--创建索引占用的内存
    sp_configure 'min  memory per query'--每次查询占用的最小内
      

  3.   

    如何使用大内存
    http://support.microsoft.com/default.aspx?kbid=899761
      

  4.   

    在 32 位系统中应用程序可访问的内存空间有 4G,但是其中有 2G 空间为用户空间,这一部分是应用程序真正可使用的,而另外 2G 空间保留给系统内核。像 LZ 这种情况,可以在 BOOT.INI 启动文件中开启 /3G 开关,让应用程序可使用 3G 的用户空间。
      

  5.   

    我的电脑windows 2003 server 系统已经能够识别出4G的内存,是不是可以不必打开/PAE开关 ???
    PAE 是不是只能将更多的物理内存分配给用户空间,来提高应用程序(比如说sqlserver)的性能
    只需要启用 sql server 2000的AWE支持,(让应用程序能识别出超过4G的内存)不知道这样做是否可行??
    各位大虾 我对PAE,AWE的理解是否正确??
      

  6.   

    准备结贴了 ,总算是搞明白了,通过我学习了解,像我这样的情况,只需要将/3g开关打开就可以了,因为我的系统是32bit的系统,只能支持4G的内存空间,其中2G的用户空间,我用/3g开关让用户空间扩大为3G 至于是调用实际的物理内存还是磁盘上的页面 由操作系统来决定了楼上有朋友建议我开启pae和awe,因为我本身实际的物理内存大小只有4个G,如果开启pae和awe 设置'max server memory' 为4G以上 势必会用到我磁盘上的虚拟的页面文件,肯定为影响性能的