2012年5月19日 星期六
SQL 重建索引
SELECT 'ALTER INDEX [' + ix.name + '] ON [' + s.name + '].[' + t.name + '] ' +
CASE
WHEN ps.avg_fragmentation_in_percent > 15
THEN 'REBUILD'
ELSE 'REORGANIZE'
END +
CASE
WHEN pc.partition_count > 1
THEN ' PARTITION = ' + CAST(ps.partition_number AS nvarchar(MAX))
ELSE ''
END,
avg_fragmentation_in_percent
FROM sys.indexes AS ix
INNER JOIN sys.tables t
ON t.object_id = ix.object_id
INNER JOIN sys.schemas s
ON t.schema_id = s.schema_id
INNER JOIN
(SELECT object_id ,
index_id ,
avg_fragmentation_in_percent,
partition_number
FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL)
) ps
ON t.object_id = ps.object_id
AND ix.index_id = ps.index_id
INNER JOIN
(SELECT object_id,
index_id ,
COUNT(DISTINCT partition_number) AS partition_count
FROM sys.partitions
GROUP BY object_id,
index_id
) pc
ON t.object_id = pc.object_id
AND ix.index_id = pc.index_id
WHERE ps.avg_fragmentation_in_percent > 10
AND ix.name IS NOT NULL
2012年5月14日 星期一
如何安裝SmartMonitor
安裝前注意事項
1.OS要Windows XP
2.不要安裝在虛擬機器上 , 要獨立的PC
3.要先確定IIS服務沒有安裝 TCP Port 80和8080沒被佔用
4.確定Windows內建的防火牆沒有開啟
5.確定防毒軟體不會阻擋網路封包的收集
6.Vigor 有Monitor Port的請將安裝SmartMonitor的電腦直接接在Monitor Port , 如果沒有Monitor Port的請進管理畫面打開Lan 端的Mirror Port 功能 , 再將安裝SmartMonitor的電腦直接接在Mirror Port上面
DEMO INSTALL SMARTMONITOR
最新軟體下載
1.OS要Windows XP
2.不要安裝在虛擬機器上 , 要獨立的PC
3.要先確定IIS服務沒有安裝 TCP Port 80和8080沒被佔用
4.確定Windows內建的防火牆沒有開啟
5.確定防毒軟體不會阻擋網路封包的收集
6.Vigor 有Monitor Port的請將安裝SmartMonitor的電腦直接接在Monitor Port , 如果沒有Monitor Port的請進管理畫面打開Lan 端的Mirror Port 功能 , 再將安裝SmartMonitor的電腦直接接在Mirror Port上面
DEMO INSTALL SMARTMONITOR
最新軟體下載
訂閱:
文章 (Atom)
WIN32_WMISetting命名空間無效,導致.NET System.Management.ManagementException
問題 ReadyGo在LOGIN,判定CPUID時,因無Windows Management Instrumentation的類別,造成 System.Management.ManagementException: Invalid namespace 原因:此錯誤是由 WMI 問...
