SELECT N'Testing Connection...' go EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters go set fmtonly off go SELECT N'Testing Connection...' go EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters go set fmtonly off go SELECT N'Testing Connection...' go EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters go SELECT N'Testing Connection...' go EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters go set fmtonly off go
http://support.microsoft.com/kb/294976/zh-cn
SET NO_BROWSETABLE ON go SET FMTONLY ON EXEC ResetLog SET FMTONLY OFF go set fmtonly off go SET NO_BROWSETABLE OFF go exec ResetLog go SET FMTONLY ON SELECT Count(ID) as LCount FROM LOG WHERE IsLan = 0 WHERE 1=2 SET FMTONLY OFF go set fmtonly off go SELECT Count(ID) as LCount FROM LOG WHERE IsLan = 0 go SET NO_BROWSETABLE ON go declare @P1 int set @P1=1 exec sp_prepare @P1 output, NULL, N'SELECT * FROM LOG', 1 select @P1 go SET FMTONLY ON SELECT Count(ID) as WCount FROM LOG WHERE IsLan = 1 WHERE 1=2 SET FMTONLY OFF go set fmtonly off go SELECT Count(ID) as WCount FROM LOG WHERE IsLan = 1 go SET NO_BROWSETABLE ON go declare @P1 int set @P1=1 exec sp_prepare @P1 output, NULL, N'SELECT * FROM LOG', 1 select @P1 go SET FMTONLY ON Select IP, Host, Person, SessionID, WriteDate, PersonID From Log WHERE 1=2 SET FMTONLY OFF go Select IP, Host, Person, SessionID, WriteDate, PersonID From Log go SELECT N'Testing Connection...' go EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters go set fmtonly off go SELECT N'Testing Connection...' go EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters go SELECT N'Testing Connection...' go EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters go set fmtonly off go SELECT N'Testing Connection...' go EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters go
入检查后发现SQLserver占用CPU资源过大,导致网站打开速度受到了影响;我们建议将SQLserver的内存和CPU资源最大消耗进行限制,这样将保证系统资源的有效利用;操作步骤如下:1、打开企业管理器2、右键单击(LOCAL) (WindowsNT) 选择属性3、选择内存和处理器标签 按照您的服务器性能配置资源使用比例按照上述步骤配置后的SQLserver将很少在会出现CPU和内存占用过多导致服务器系统满的情况,当然服务器慢
的原因很多,例如程序原因、带宽原因等,我们更加需要多看多检查,让服务器时刻保持最健康状态。
go
EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters
go
set fmtonly off
go
SELECT N'Testing Connection...'
go
EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters
go
set fmtonly off
go
SELECT N'Testing Connection...'
go
EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters
go
SELECT N'Testing Connection...'
go
EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters
go
set fmtonly off
go
go
SET FMTONLY ON EXEC ResetLog SET FMTONLY OFF
go
set fmtonly off
go
SET NO_BROWSETABLE OFF
go
exec ResetLog
go
SET FMTONLY ON SELECT Count(ID) as LCount FROM LOG WHERE IsLan = 0
WHERE 1=2 SET FMTONLY OFF
go
set fmtonly off
go
SELECT Count(ID) as LCount FROM LOG WHERE IsLan = 0 go
SET NO_BROWSETABLE ON
go
declare @P1 int
set @P1=1
exec sp_prepare @P1 output, NULL, N'SELECT * FROM LOG', 1
select @P1
go
SET FMTONLY ON SELECT Count(ID) as WCount FROM LOG WHERE IsLan = 1
WHERE 1=2 SET FMTONLY OFF
go
set fmtonly off
go
SELECT Count(ID) as WCount FROM LOG WHERE IsLan = 1 go
SET NO_BROWSETABLE ON
go
declare @P1 int
set @P1=1
exec sp_prepare @P1 output, NULL, N'SELECT * FROM LOG', 1
select @P1
go
SET FMTONLY ON Select IP, Host, Person, SessionID, WriteDate, PersonID From Log
WHERE 1=2 SET FMTONLY OFF
go
Select IP, Host, Person, SessionID, WriteDate, PersonID From Log go
SELECT N'Testing Connection...'
go
EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters
go
set fmtonly off
go
SELECT N'Testing Connection...'
go
EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters
go
SELECT N'Testing Connection...'
go
EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters
go
set fmtonly off
go
SELECT N'Testing Connection...'
go
EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters
go
这服务器上安装了一个新的CRM,
难不成是这个CRM软件对sqlserver就是这么使用的?
扫描也有一样,
同一秒能探查到25000次的这种Lock和Scan。
同一微秒能探查到1000次的这种Lock和Scan。咋回事?这里的锁不会是为了数据的安全和完整而进行的锁吧。
问题是,也没有人在用这个软件。