2010年9月19日 星期日

Windows 2008遠端桌面連接數設定

Refer to internet link and it says:

Many times, you’ll find it necessary to have multiple connections to a Remote Desktop server, and by default, Windows Server 2008, Windows Server 2003, Window Vista, Windows XP, etc. limit the number of Remote Desktop Connections to 1 user. On Windows Server 2008, the Restrict Terminal Services users to a single remote session Group Policy setting determines whether you can connect to your existing physical console session. When this option is enabled, when logging on by default, you will be restricted to a single remote session.
Run "gpedit.msc."  This setting is available in the Computer Configuration\Administrative Templates\Windows Components\Terminal Services\Terminal Server\Connections node of the Local Group Policy Editor. You can also configure this setting in Terminal Services Configuration. The Restrict each user to a single session setting appears in Edit settings in the General section. Sometimes it is under "Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections\Restrict Rmote Desktop Services users to a single Remote Desktop Services session" to disabled
If you would like to have multiple simultaneous sessions for the same user, please uncheck this setting or set this group policy as Disabled.
For more information regarding Changes to remote administration in Windows Server 2008, please refer to the following KB article:
Changes to remote administration in Windows Server 2008
http://support.microsoft.com/kb/947723
sources:
Setting up multiple sessions by disablign group policy. http://www.techotopia.com/index.php/Configuring_Windows_Server_2008_Remote_Desktop_Administration#Running_Multiple_Remote_Desktops

Setting up multipe sessions using MMC Remote Desktops snap-in. http://i.nconspicuo.us/2008/11/20/enable-multiple-remote-desktop-connections-in-window-server-2008/

TM

2010年9月16日 星期四

Sybase Power Designer 連接 SQL Server 2008/ 2005


利用 Sybase Power Designer 工具來做 Schema Report 已經是專案中必走的路子
但最近發現 12, 15 版本連結 SQL Server 2008 總是會出現以下惱人的問題

Unable to list the tables.
[Microsoft][ODBC SQL Server Driver][SQL Server]陳述式無法準備。
SQLSTATE = 37000

後來 Google 了一下, 發現原來是資料庫相容的問題
利用以下 SP 可以調整相容度

EXEC SP_DBCMPTLEVEL '您的資料庫', '90'; 


80 是與 2000 相容
90 是與 2005 相容
100 是與 2008 相容

好像 Sybase PD 12, 15 與 SQL Server 2008 向容度不是很好
山不轉路轉, 調整一下相容度就可以解決這個問題



2010年9月11日 星期六

Visual Studio 2008 連結 SQL Server 2008

在資料設定連結時,系統出現以下錯誤


無法開啟到資料庫間的連接
"不支援此伺服器版本。僅支援 Microsoft SQL Server 2005 以上的伺服器。"


解決方式: 趕快去更新 Visual Studio 2008  Service Pack 1 吧 (約 900M) 

2010年8月17日 星期二

.NET 的四捨五入處理

這篇寫的真好

Round 真的是四捨五入嗎

在 .NET 中四捨五入最好採用
Math.Round(number, 0, MidpointRounding.AwayFromZero);
否則 Math.Round(???.5) 出現的結果一定會讓您吃驚

2010年8月8日 星期日

裝置管理員一片空白

<< 資料來源, 網路 >>
解決裝置管理員一片空白2個步驟
1.
開啟「控制台」
點選「系統管理工具」→「服務」
找到「PLUG and PLAY」 將之重新啟動
2.
開始
執行
regedt32
找尋HKEY_LOCAL_MACHINE→system→currentcontrolset→enum
滑鼠移至enum按右鍵
點選「使用權限」
點選administrators(或system)
按下進階
在下方『從父項繼承到子物件的權限項目,以顯示於此套用到子物件的項目物』打勾
按「套用」、「確定」

然後再重新執行裝置管理員
所有的裝置就會出現了

這招不用開機喔!! 

2010年7月28日 星期三

如何輸入¥

從 Wiki 找到的資料 ...

在日文微軟作業系統中,「¥」符號在代碼頁932中的代碼與「\」符號在ASCII中的代碼相同,都是92(在十六進制中為5C)[2]。在Microsoft Windows作業系統中,如果鍵盤沒有能直接輸入「¥」的按鍵,可以通過以下步驟輸入「¥」符號:

1. 按下 alt 鍵;在鍵盤右側的數字鍵盤處輸入「0165」;鬆開 alt 鍵。
2. 在Microsoft Word中,可以先鍵入「00A5」或「00a5」,然後按下alt+X鍵輸入「¥」符號。

2010年7月15日 星期四

流水號

SQL Server 的資料列流水號
select ROW_NUMBER() over (order by column) , ...
Oracle  的資料列流水號
select rownum, ...