星期一, 5月 08, 2017

SQL Agent Job Failed: This error occurs when there is a cryptographic error.

從 DTS 轉移到 SSIS 的排程在執行時發生錯誤,錯誤畫面如下,看起來就像是沒有權限去解密執行,

Description: Failed to decrypt protected XML node "PassWord" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2017-05-08 02:00:00.91     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "PassWord" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2017-05-08 02:00:00.91     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2017-05-08 02:00:01.25     Code: 0xC002F304     


後來應該是我有編輯過,RUN AS 要改成我用來編輯的帳號來執行,因為預設會用該帳號去加密,所以這邊只要設定 Credentials 裡面先建立帳號,再到 SQL Server Agent 設定 Proxy


接著在 Run as 就可以選擇該帳號,執行就可以成功了。


Convert DTS from SQL Server 2000 to SQL Server 2008 R2 SSIS

當 SQL Server 從 2000 升級之後,就沒有 DTS 可以使用了,這時候只能將 DTS 轉成 SSIS,
需要安裝 Microsoft SQL Server 2000 DTS Designer Components 跟 Microsoft SQL Server 2005 Backward Compatibility Components 64 bit 就可以使用 DTS 封裝移轉精靈。

在 SQL Server 2008 Management Studio 展開 Management -> Legacy -> Data Transformation Service,按右鍵選擇 Migration Wizard

接下來就是選擇來源,這邊我選擇舊的 SQL Server 2000
 匯入到新的 SQL Server 2008
 選擇要轉換匯入成 SSIS 的 DTS
 找個地方來放 Log 的
 最後確認,沒問題點選 Finish 後開始轉換
接下來連到 Integration Service 就可以看到匯入的 SSIS 了


星期三, 4月 26, 2017

X220 升級 USB 3.0, 換鍵盤, 藍芽 4.0

X220 真的是一台好機器,可惜年代久遠,當時只有 i7 的機器有支援一個 USB 3.0,我手上這台 i5 就只能靠擴充卡去達到這目的

當然,當年也還沒有藍芽 4.0,可是現在的藍芽滑鼠都是 4.0 的,沒有向下支援,所以也要換掉。

 既然都要拆開了,就順便把鍵盤也換掉吧!
要換鍵盤跟開 C 蓋就只要卸除七個螺絲
藍芽的位置就在這裡,鬆開螺絲換上 4.0 的就可了。
Windows 10 開機就抓到了,什麼都不用安裝就可以使用,
換上新鍵盤,整個就乾淨多了。

星期四, 4月 13, 2017

SQLite Administrator

SQLite 是一個免費又好用的檔案型資料庫,第一次認識他是在上 Android 開發的課程,現在要開發 Windows Mobile 6.5 上面的程式時,就想到使用 SQLite 來當作資料庫紀錄,避免無線網路連線問題時,有資料的遺失。

既然是資料庫,就需要有一個管理介面了,網路上找到蠻好用的 SQLite Administrator 軟體

官網:http://sqliteadmin.orbmu2k.de/
下載:http://download.orbmu2k.de/download.php?id=19

整個介面就很簡單,而且還有正體中文可以選擇,建立好資料庫之後,新增 Table 也可以發現有很多欄位的設定可以使用,建立好 Table 後就可以放到 Mobile Device 中給程式使用了。


星期二, 4月 11, 2017

遠端桌面也可以多螢幕了

一直覺得遠端桌面只能用一個螢幕在工作上很不方便,突然發現 Windows 10 的遠端桌面在顯示有多一個選項可以選擇,"遠端工作階段使用我的所有監視器",看起來就像是可以遠端桌面使用多螢幕的意思,立馬就測試一下,真的是可以操作遠端桌面使用多螢幕。

灑花!!!以後從家裡連去公司就可以使用多螢幕了。



星期一, 4月 10, 2017

Windows Mobile Device Center(WMDC) 安裝至 Windows Server 2008

在 Windows Server 2008 安裝 Windows Mobile Device Center 的時候跳出錯誤,




無法安裝更新,至少缺少一個以上的 Windows 元件所需的 Windows Mobile 裝置中心

就這樣,停止安裝了,也不告訴我缺什麼東西,還好 Google 很厲害,馬上就找到了


  1. 按一下 [開始],指向 [系統管理工具],然後按一下 [伺服器管理員
  2. 在主控台樹狀目錄中,請按一下 [功能],然後按一下 [新增功能
  3. 在詳細資料] 窗格中,按一下以選取 [桌面體驗] 核取方塊。
  4. 按一下 [下一步],再安裝
  5. 重開機
接下來就可以安裝 Windows Mobile Device Center 。

參考:https://support.microsoft.com/zh-tw/help/950169/windows-mobile-device-center-requires-the-desktop-experience-on-windows-2008

星期一, 3月 27, 2017

.NET FTP library

發現一個還蠻好用的 FTP Library

在 Ftp.dll 很多常用的功能都已經寫好,

尤其是一些遠端的上傳下載整個資料夾的上傳跟下載,

SSL 的部份,還有取得 FTP File or Folder List 的部份,

還可以透過 Hash 來驗證上傳與下載的檔案是否完整,

免費的就很好用了,唯一缺點是上傳的時候有可能 filename 會被 Rename,

所以我上傳就用自己寫的,其他使用到的功能就用他提供的來進行。

下載 Ftp.dll

官網:https://www.limilabs.com/ftp/download

星期一, 3月 13, 2017

Windows Server 2008 單一帳號多重登入的方法

要設定這種系統相關的,當然就是要叫出 Local Group Policy Editor


接著就是找出設定了,路徑如下

Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Connections



找出 Restrict Remote Desktop Service users to a single Remote Desktop Services session 設置為停用就行了



星期三, 3月 08, 2017

VS 2017 offline installer

Visual Studio 2017

想說要來下載最新的 Visual Studio 2017 Community 版本,等有空的時候來安裝看看,

沒想到在官網下載後只能線上安裝,這也太不人性了吧
https://www.visualstudio.com/zh-hant/downloads/

馬上就找到另一個說明如何下載成 offline installer 方式
https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio

要從命令提示字元來進行 vs_community.exe --layout D:\vs2017offline

沒想到竟然是一個一個檔案的下載,沒有 ISO 檔可以下載,這樣真的會被抱怨呀。







新增:我也不知道下載了多久,下載完成後,檔案將近 15G,網路不夠快就要等很久很久。


星期二, 2月 14, 2017

Window Mobile 6 Hello

開始 VS2008 之後建立新專案,選擇智慧型裝置專案,我是選擇 C# 底下的,VB 跟 C++ 也是有一樣的範本
選擇對應的目標平台
選擇.Net Compact Framework 版本,範本我選擇裝置應用程式
接下來我們的 Form1 就跑出來囉
拉了一個 Label 到畫面中
點選開始偵錯後會跳出部署位置,這邊都是模擬器
等模擬器啟動後,程式部署完成

參考:https://dotblogs.com.tw/corner/2008/12/18/6437