sp_configure 'max online engines',4
go
--配置启动cpu个数
sp_configure 'number of engines at startup',4
go
--配置最大内存数
sp_configure 'max memory' ,2097151
go
--分配最大存储过程缓存
sp_configure 'procedure cache',102400
go
--配置高速缓存
sp_cacheconfig  'default data cache' , '700M'
go
--缺省缓存分配页大小
sp_poolconfig 'default data cache','200M','16K'
go
--网络包大小
sp_configure 'max network packet size',1024
go

--最大连接数
sp_configure 'number of user connections',500
go
--最大打开对象
sp_configure  'number of open object',9000
go
--最大索引
sp_configure  'number of open index',10000
go
--最大锁数
sp_configure  'number of locks',100000
go

--增加网络内存
--sp_configure  'additional network memory',1024
go

--锁内存
sp_configure  'lock shared memory',512
go

--优化tempdb
select dbid, name,segmap
from sysusages,  sysdevices
where sysdevices.low  <= sysusages.size +vstart
and sysdevices.high >=sysusages.size+vstart -1
and dbid =2
and (status=2 or status=3)
go
use tempdb
go
sp_dropsegment  'default',tempdb,master
go
sp_dropsegment  'logsegment',tempdb,master
go


select dbid, name,segmap
from sysusages,  sysdevices
where sysdevices.low  <= sysusages.size +vstart
and sysdevices.high >=sysusages.size+vstart -1
and dbid =2
and (status=2 or status=3)
go

sp_cacheconfig tempdb_cache, '100M'
go
sp_poolconfig tempdb_cache,'50M','16K'
go
sp_bindcache 'tempdb_cache',tempdb
go
sp_helpcache tempdb_cache

select name,id from syscharsets

dbcc traceon(3604)
dbcc memusage

相关文章:

  • 2022-12-23
  • 2021-12-13
  • 2021-11-18
  • 2021-11-23
  • 2022-01-08
  • 2021-10-10
  • 2022-01-18
猜你喜欢
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2021-08-14
  • 2021-10-20
相关资源
相似解决方案