2013年4月19日 星期五

win2003 r2記憶體使用設定

人客的一個系統要更換到一台新主機上,規格如下
  1. 型號:HP ProLiant DL380 G7
  2. CPU:Intel Xeon CPU E5620 @ 2.40GHz *2 四核
  3. RAM:32GB ( 32758 MBytes)
  4. OS: Microsoft Windows Server 2003 Enterprise Edition R2

因為參考舊機器boot.ini(16GB記憶體)
[boot loader]
timeout=30
default=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 /PAE /3GB /USERVA=2900

結果重開機後原本32GB的記憶體只剩下16GB

查看了幾篇文章後....

原來win 2003 超過16GB實體記憶體時,/3GB 不可使用,否則機器仍只會使用16GB的記憶體.

 這篇說明的還蠻詳細的. 
 Using the 3GB and PAE switches when running SQL 2005 causes issues
boot.ini設定方式
 
For system with more than 16GB RAM
/PAE

For systems with between 4GB – 16GB RAM
/PAE /3GB /USERVA=3000
/PAE /3GB /USERVA=2900
/PAE /3GB /USERVA=2800
/PAE

For systems with 4GB RAM or less.
/3GB
/3GB /USERVA=3000
/3GB /USERVA=2900
/3GB /USERVA=2800

Do not set the USERVA values less than 2800 or more than 3072. 
Large memory support is available in Windows Server 2003 and in Windows 2000
這篇KB則說明不設PAE則AWE也無法使用超過4GB的RAM


How to: Enable the Lock Pages in Memory Option (Windows)
使用AWE前要先確定sql server services啟動帳戶是否有啟用鎖定記憶體分頁權限


SQL SERVER上配合設定啟用AWE
sp_configure 'show advanced options', 1
RECONFIGURE
GO
sp_configure 'awe enabled', 1
RECONFIGURE
GO 
sp_configure 'min server memory', 1024
RECONFIGURE
GO
sp_configure 'max server memory', 30720
RECONFIGURE
GO

這篇列出作業系統記憶體上限
Memory Limits for Windows Releases

Windows Server 2003 R2 Enterprise Edition 64 GB(16 GB with 4GT)

最後的boot.ini為下
[boot loader]
timeout=30
default=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 /PAE

 

2013年4月17日 星期三

系統捷徑失效,icon消失?

OS: win7 64bit
最近不知裝了什麼,有時電腦開始或工作列上的一些系統捷徑就突然都失效了.icon也變成不知的圖示.

今天電腦用到一半,又出現了有部份的捷徑失效..

當我要打開visual studio 2010 (這個在開始上的捷徑及icon看來都是OK的) 時竟然出現 這個錯誤.

Exception has been thrown by the target of an invocation.

後來只好登出再登入後,整個才又正常了起來。


2013/05/07
今早做完sql 2012 sp1 KB更新後,變成系統捷徑原有的icon都消失了。重新登入或開機也無法回復,但捷徑點進去功能又是OK的。

後來看到這篇 [Windows7]修復桌面與開始功能表中錯亂或是消失的捷徑圖示

將C:\Users\beverly\AppData\Local\IconCache.db 刪除重開機就OK了..

幾次經驗下來,安裝或更新sql 2012、vs2012後都會出現這種奇怪的狀況.實在是不解啊....

2013年4月10日 星期三

查看sql server error log

--保留多少個error log (例100個)
exec master..xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs', REG_DWORD, 100


--查看目前共有幾個error log
exec master..xp_enumerrorlogs

--重新產生一個error log
exec master..sp_cycle_errorlog

--查看第幾個log內容(由0開始, 例第13個)
exec master..sp_readerrorlog 12

2013年4月8日 星期一

一些help文件

最近在學習憑證一些相關內容.

看到windows有一些說明文件里頭的說明挺有幫助.

想要離線放到手機上讀取.找到了這些說明文件的存放的路徑

C:\Windows\Help\mui\0404\

certmgr.CHM 是有關憑證的

publish error allowDefinition='MachineToApplication'

一個老舊的aspx web form專案,調了一些功能建置成功,但進行部署時顯示以下錯誤。 在應用程式層級之外使用註冊為 allowDefinition='MachineToApplication' 的區段發生錯誤。錯誤的原因可能是虛擬目錄尚未在 IIS 中設定為...