zoukankan      html  css  js  c++  java
  • SQL Server sp_configure 控制内存使用

    背景知识:

                sp_configure   显示或更改当前服务器的全局配置设置(使用 sp_configure 可以显示或更改服务器级别的设置。)

                查看 全局配置值

                方法 1、execute sp_configure;直接查看所有。

                方法 1、execute sp_configure @configname='Name';直接查看指定。

                方法  2、保存到表中以方便操作

                            第一步:建表

                                     create table InstanceConfigure(
                                     name nvarchar(35),
                                     minimum int,
                                     maximum int,
                                     config_value int,
                                     run_value int);
                                     go

                             第二步:插入数据

                                      insert into InstanceConfigure
                                      execute sp_configure;
                                      go

    -----------------------------------------------------------------------------------------------------------------------------------------------------------

    方法 1、

             min server memory 是指sql server r 地址空间增长到这上值以后,就不会小于这个值。当启动sql server时只申请所需要的内存。

             execute sp_configure @configname = 'min server memory (MB)',@configvalue = 100
             reconfigure with override;
             go

    方法 2、

             max server memory 控制 total server memory 的最大大小。也是通过sp_configure 配置;

    方法 3、

             set working set size 这个过时了,windows 以不再尊重这个参数。也是通过sp_configure 配置;

             请不要用。

    方法 4、

             lock pages in memory   

             查看我的文章:

                              http://www.cnblogs.com/JiangLe/p/4008036.html

  • 相关阅读:
    linux如何用yum进行部署xampp环境
    jmeter关联案例的几种方法
    jmeter中元件
    CentOS7在VMware下设置成桥接模式
    CentOS7使用vsftpd搭建ftp
    虚拟机WMware15和CnetOS7安装
    MySql忘记密码的解决方案
    Windows下MySql8解压版的安装与完全卸载
    Idea设置统一为utf-8编码格式
    Idea常用快捷键
  • 原文地址:https://www.cnblogs.com/JiangLe/p/4008123.html
Copyright © 2011-2022 走看看