當我嘗試生成包含500000條記錄的表的腳本時我收到一個錯誤:類型'System.OutOfMemoryException'的異常被拋出。任何人都可以建議一個解決方案來備份表格數據來清除這個錯誤。異常'System.OutOfMemoryException'
1
A
回答
0
逼真地生成一個包含500,000個插入的腳本不會特別有效(假設你不會用完RAM)。如果您需要備份數據,我會考慮從文件系統備份數據庫文件本身,或者使用類似SSIS的方式導出到文件。兩者都應該工作得很好。
0
根據您的描述,似乎沒有足夠的內存,並且我注意到您使用的是32位Windows Vista,32位機器可以直接處理僅4 GB的內存,並且默認情況下爲Windows自己保留最高2GB的地址空間供自己使用,這使得任何應用程序的VAS(虛擬地址空間)的最大大小隻剩下2GB。
但是,我們可以使3GB開關,使應用程序具有高達3GB的增值業務,這裏是步驟適用於Windows Vista:
右鍵單擊附件程序組在開始菜單中的命令提示符。以管理員身份運行。 在命令提示符處輸入「bcdedit/set IncreaseUserVa 3072」 重新啓動計算機。
相關問題
- 1. 異常'System.OutOfMemoryException'被引發
- 2. system.dll中的異常「System.OutOfMemoryException」
- 3. System.OutOfMemoryException:類型'System.OutOfMemoryException'的異常被拋出angularjs
- 4. 類型'System.OutOfMemoryException'的異常被拋出
- 5. 類型'System.OutOfMemoryException'的異常被拋出
- 6. Dispatcher內部拋出異常'System.OutOfMemoryException'
- 7. System.OutOfMemoryException:上傳文件時出現異常
- 8. 類型'system.outofmemoryexception'的異常被拋出
- 9. 異常的類型'System.outOfmemoryException被拋出'
- 10. 引發了類型'System.OutOfMemoryException'的異常。
- 11. 正在讀取大文件 - System.OutOfMemoryException:拋出了類型爲「System.OutOfMemoryException」的異常。在C#
- 12. System.OutOfMemoryException:拋出類型爲「System.OutOfMemoryException」的異常。下載大文件中的MVC 4
- 13. 處理異常如不爲System.OutOfMemoryException的try-catch
- 14. 在System.Drawing.dll中發生未處理的異常類型'System.OutOfMemoryException'
- 15. C#MultiThreading導致類型'System.OutOfMemoryException'未處理的異常
- 16. 類型 'System.OutOfMemoryException的' 未處理的異常發生在system.xml.dll的
- 17. 上傳Blob時拋出類型'System.OutOfMemoryException'的異常
- 18. 類型'System.OutOfMemoryException'的異常僅針對10000條記錄被拋出
- 19. 什麼異常除了System.OutOfMemoryException之外,string = string throw?
- 20. 的System.OutOfMemoryException:類型的異常「System.OutOfMemory」被拋出
- 21. 「使用xmlserializer時拋出」System.OutOfMemoryException類型的異常「
- 22. 未知的構建錯誤'異常類型'System.OutOfMemoryException'被拋出
- 23. System.OutOfMemoryException
- 24. System.OutOfMemoryException
- 25. System.OutOfMemoryException
- 26. 表差異組件失敗,出現'System.OutOfMemoryException'
- 27. System.OutOfMemoryException VB6
- 28. itextsharp.dll中發生類型'System.OutOfMemoryException'的異常,但未在用戶代碼中處理
- 29. 加載配置文件時發生錯誤:引發類型'System.OutOfMemoryException'的異常
- 30. 從文本文件讀取數據時拋出類型'System.OutOfMemoryException'的異常
你的SQL Server Management Studio或其他應用程序中運行查詢時收到此錯誤? – Kane 2010-01-18 12:29:05
您生成的是哪種腳本--DDL(即CREATE TABLE ...)或DML(即INSERT INTO ...)? – 2010-01-18 12:30:44
實際上我試圖採取備份的表,因爲它有500000記錄,但即時通訊這個異常,這避免了我採取腳本。我需要任何幫助這個.. – Innova 2010-01-18 12:33:41