大資料量遷移的一些心得最近遷移了一個大約30G的SQL SERVER 2000的資料庫到DB2 8.1。以下為遷移的工作心得:1、在大表的遷移中,不要因為圖快而先遷移資料然後建立主鍵索引。因為很有可能系統沒有足夠的資源完成這樣的操作。我在遷移超過400萬行記錄的表時,等遷移完資料後,再建立Primary Key時,提示資源不足而出錯。2、插入資料可以使用DB2的一個特色功能,一個Insert語句,可以帶多個Values。INSERT INTO T (F1, F2) VALUES (?, ?),
Oralce和DB2都支援的文法:UPDATE A SET (A1, A2, A3) = (SELECT B1, B2, B3 FROM B WHERE A.ID = B.ID)MS SQL Server不支援這樣的文法,相對應的寫法為:UPDATE A SET A1 = B1, A2 = B2, A3 = B3 FROM A LEFT JOIN B ON A.ID = B.ID個人感覺MS SQL Server的Update文法功能更為強大。MS SQL SERVER的寫法:
Mail.HTMLBody ="Dear sir,<br>"+"Please reply the following question.<br>"+strqeustion+"<br>From "+strmail 改為: Mail.Body = "Dear sir,<br>"+"Please reply the following question.<br>"+strqeustion+"<br>From
SqlCommand.Parameters中的參數變量要在前面加@如:myCommand.CommandText = "SELECT CustomerID, CompanyName FROM Customers WHERE Country = @Country AND City = @City";OracleCommand.Parameters中的參數變量要在前面加:如:myCommand.CommandText = "UPDATE test SET test1 =:test1, test2 =
Microsoft發布Member Management 組件 for ASP.NET v1.1 A Simple Drag And Drop How To Examplehttp://www.codeproject.com/aspnet/NickPhotoBrowser.aspAn intelligent 404 page http://www.codeproject.com/aspnet/intelligent404page.aspPhoto album browsing