商務英語計算機英語

計算機專業英語學習文章:如何解決數據庫中的損壞

本文已影響 2.81W人 

計算機英語的特點:計算機英語與其他專業英語的最大區別就在於它的“日新月異”,特點也不少:客觀、嚴謹、準確、精練,專業術語多,縮略語經常出現,合成的新詞多,介詞短語、分詞短語和名詞性詞組使用頻繁,長句、祈使句和被動語態使用較多,方程與數字佔有一定比列。下面是本站小編整理的計算機專業英語學習文章, 希望對大家有幫助。

ing-bottom: 66.88%;">計算機專業英語學習文章:如何解決數據庫中的損壞

It's important to understand that any time anAccess client disconnects unexpectedly, it mayset a "corruption flag" in the file indicatingthat the database is in a corrupt state (regardlessof whether any data has actually been corruptedor not). Any user who attempts to open thedatabase while this flag is set will receive amessage, and the database will have to berepaired before it can be used. If the users don'thave permission to perform the repair, or don'tknow how to perform the repair, there may be significant downtime before the database is availableagain. This can result in a loss of productivity as well as extreme frustration for the users. Followingthe 5 tips below will minimize your odds of data loss from corruption in your Access databases.

  1) Split your database.

The single most important thing you can do to prevent corruption in MS Access databases is to splitthe database into a "front-end" and a "back-end". The front-end contains all of the forms, queries,and reports, while the back-end contains only the data tables. A copy of the front-end is placed oneach user's computer, and the back-end with the table data is stored in a shared folder on thenetwork. How does this prevent corruption? Well, consider the amount of information that mustmake it across your network to your computer each time you open a form or report. If one bit of thatinformation doesn't make it intact, you risk corrupting your database. Alternatively, if the forms,queries and reports are all stored on your local computer, then the only bit of information that needsto traverse the network is the actual table data. By reducing the amount of data you need to moveback and forth across the network, you significantly reduce the chances of corrupting your you're having corruption problems with an Access database on a network drive, splitting thedatabase is the single most important thing you can do to stop it.

  2) Don't hold connections open.

This one applies to both programmers and users. If you're a programmer, make sure you close yourconnections as soon as possible after using them. Leaving the connections open will allow moreopportunities for an "unexpected" dropped connection. The only time you may want to leave aconnection open longer than required would when it's used inside a loop. For such a case, open theconnection at the beginning of the loop, and then close it after the loop is completed. Just make sureit gets closed for all cases (including exceptions).

If you're using a Microsoft Access database or application, be sure to close it when you're n, leaving the application open provides the opportunity for corruption if a network connectionis lost. Remind users to always close the application before going home, as nightly backup jobs mayfail or cause corruption in the shared file if there are open connections.

  3) Exit the database correctly.

Always close the database or application correctly. Ctrl-Alt-Delete/End Task can wreak havoc onAccess databases. Whenever possible, complete your tasks, then close the application using the File -Exit menu option or alternative Exit option provided by the application.

  4) Don't skimp on hardware.

Remember that the corruption flag can be set from the slightest packet loss between your computerand the database file. MS Access has sometimes been called "the canary in the coal mine". It hasgained this reputation from being the first application to "die" when there's the slightest hint oftrouble on your network. Just like the slightest presence of gas caused the canary to die, the slightestpresence of network problems and packet loss can kill your Access applications. Make sure you'renot using the cheap built-in NICs that come with some PCs. Instead, use brand name network same goes for cheap hubs. Whenever possible, match good brands of equipment throughoutyour network.

  5) Compact and repair regularly.

Performing the built-in compact and repair function regularly is recommended to prevent corruptionand improve performance. Consider automating this function with a utility to compact and repair allof your databases nightly or during the weekend.

Error messages to look out for - the following error messages may signal database corruption:

"The database '' needs to be repaired or isn't a Microsoft Access database file."

"Record(s) can't be read, no read permissions on ''"

"Unexpected Error 35012"

"Unrecognized database format ''."

"'' isn't an index in this table. Look in the Indexes collection of the TableDefobject to determine the valid index names."

"The Microsoft Jet database engine could not find the object 'databases'. Make sure the object existsand that you spell its name and path name correctly."

"The database has been placed in a state by user '' on machine '' that prevents it from being openedor locked"

"Disk Error -- Reserved error (-1601)"

"The database has been placed in an unexpected state."

"Record(s) cannot be read; no read permission on 'MSysObjects'"

"Record(s) cannot be read; no read permission on 'MSysACEs'."

"The Microsoft Jet database engine cannot find the input table or query 'MSysAccessObjects'. Makesure it exists and that its name is spelled correctly."

  Conclusion:

While you may never be able to prevent all Microsoft Access database corruption, you should beable to stop 98% of the problems before they occur by following these 5 simple tips. Follow thesetips and implement a prudent automated backup schedule to minimize your odds of significant dataloss.

猜你喜歡

熱點閱讀

最新文章