Table of contents
TOC
折叠目录
展开目录

0 数据库引擎驱动程序0 Database Engine Driver

office 365 dev account|上次更新日期: 2018/4/3
|
1 参与者

适用于: Access 2013 | Access 2016Applies to: Access 2013 | Access 2016

安装 Microsoft® Access 数据库引擎数据库驱动程序时,安装程序会向 Microsoft Windows® 注册表的“Engines”和“ISAM Formats”子项中写入一组默认值。您必须使用注册表编辑器添加、删除或更改这些设置。以下各节说明了 Microsoft Access 数据库引擎数据库驱动程序的初始化和 ISAM 格式设置。When you install the Microsoft® Access database engine database driver, the Setup program writes a set of default values to the Microsoft Windows® Registry in the Engines and ISAM Formats subkeys. You must use the Registry Editor to add, remove, or change these settings. The following sections describe initialization and ISAM Format settings for the Microsoft Access Database Engine database driver.

Microsoft Jet 引擎初始化设置Microsoft Jet Engine Initialization Settings

访问连接 Engine\Engines文件夹中包括访问 Microsoft Access 数据库中使用的 msjet40.dll 数据库引擎的初始化设置。The Access Connectivity Engine\Engines folder includes initialization settings for the msjet40.dll database engine, used for access to Microsoft Access databases.下面的示例显示了此文件夹中各项的典型初始化设置。Typical initialization settings for the entries in this folder are shown in the following example.

SystemDB = <path>\System.mdb 

CompactBYPkey = 1 

PrevFormatCompactWithUNICODECompression=1

Microsoft Access 数据库引擎使用下列项。The Microsoft Access database engine uses the following entries.

EntryEntry说明Description
SystemDBSystemDB指定工作组信息文件的完整路径和文件名。默认值为后面跟有文件名 System.mdb 的相应路径。值为 REG_SZ 类型。Specifies the full path and file name of the workgroup information file. The default is the appropriate path followed by the file name System.mdb. Values are of type REG_SZ.
CompactByPKeyCompactByPKey指定在压缩表复制主键顺序,如果表中存在一个主键。Specifies that when you compact tables they are copied in primary-key order, if a primary key exists on the table.如果不存在主键的表,这些表按基表顺序复制。If no primary key exists on a table, the tables are copied in base-table order.值为 0 表示,应按基表顺序; 压缩的表一个非零值指示,应按主键顺序压缩表存在主键。A value of 0 indicates that tables should be compacted in base-table order; a non-zero value indicates that tables should be compacted in primary-key order, if a primary key exists.默认值为非零值。The default value is non-zero.值为 REG_DWORD 类型。Values are of type REG_DWORD.
PrevFormatCompactWithUNICODECompressionPrevFormatCompactWithUNICODECompressionMicrosoft Access 数据库中使用 Unicode 字符设置为存储的文本数据。Microsoft Access database engine databases use the Unicode character set to store textual data.压缩 Unicode 数据可以减少以后需要的页读取/写入操作的数量因而可以显著改进数据库的性能。Compressing the Unicode data can significantly improve the performance of the database because of the reduced number of page read/write operations that are needed afterwards.此键决定使用 Microsoft Jet 数据库引擎 3.x 版或较早版本创建的数据库是应通过压缩的 Unicode 创建还是应通过未压缩的 Unicode 创建。This key determines if databases created by the Microsoft Jet database engine version 3.x or earlier should be created with compressed Unicode or un-compressed Unicode.请注意 此设置不适用于 Microsoft Access 数据库引擎的数据库数据库压缩。Note This setting does not apply to compacting Microsoft Access database engine databases databases.Microsoft Access 数据库引擎的数据库的数据库将默认保留它们创建的压缩设置。Microsoft Access database engine databases databases will default to keep the compression settings with which they were created.

访问连接 Engine\Engines\ACE文件夹中包括访问 Microsoft Access 数据库中使用的 Ace.dll 数据库引擎的初始化设置。The Access Connectivity Engine\Engines\ACE folder includes initialization settings for the Ace.dll database engine, used for access to Microsoft Access databases.下面的示例显示了此文件夹中各项的典型初始化设置。Typical initialization settings for the entries in this folder are shown in the following example.

FlushTransactionTimeout=500 

LockDelay=100 

LockRetry=20 

MaxBufferSize= 0 

MaxLocksPerFile= 9500 

PageTimeout=5000 

Threads=3 

UserCommitSync=Yes 

ImplicitCommitSync=No 

ExclusiveAsyncDelay=2000 

SharedAsyncDelay=0 

RecycleLVs=0 

PagesLockedToTableLock=0

Microsoft Access 数据库引擎使用下列项。The Microsoft Access database engine uses the following entries.

EntryEntry说明Description
PageTimeoutPageTimeout从将未锁定读取的数据放置在内部缓存中到该数据失效之间的时间长度,以毫秒表示。默认值为 5000 毫秒(即 5 秒)。值为 REG_DWORD 类型。The length of time between the time when data that is not read-locked is placed in an internal cache and the time when it is invalidated, expressed in milliseconds. The default is 5000 milliseconds or 5 seconds. Values are of type REG_DWORD.
FlushTransactionTimeoutFlushTransactionTimeout此项禁用 ExclusiveAsyncDelay 和 SharedAsyncDelay 注册表项。要启用这些项,必须输入值 0。FlushTransactionTimeout 更改 Microsoft Access 数据库引擎用于向数据库文件进行异步写入的方法。This entry disables both the ExclusiveAsyncDelay and SharedAsyncDelay registry entries. To enable those entries, a value of zero must be entered. FlushTransactionTimeout changes the Microsoft Access database engine's method for doing asynchronous writes to a database file.
LockDelayLockDelay此设置与 LockRetry 设置协同工作,原因在于它会导致每个 LockRetry 等待 100 毫秒后才发出另一个锁定请求。添加 LockDelay 设置是为了防止某些网络操作系统中发生“爆发”。This setting works in conjunction with the LockRetry setting in that it causes each LockRetry to wait 100 milliseconds before issuing another lock request. The LockDelay setting was added to prevent bursting that would occur with certain networking operating systems.
MaxLocksPerFileMaxLocksPerFile此设置可防止 Microsoft Access 数据库引擎中的事务处理超出指定值。如果事务处理中的锁定数试图超出此值,则事务处理就会拆分为两个或两个以上的部分,逐个地提交。添加此设置是为了防止 Netware 3.1 服务器在超出指定的 Netware 锁定限制时崩溃以及改进 Netware 和 NT 的性能。This setting prevents transactions in the Microsoft Access database engine from exceeding the specified value. If the locks in a transaction attempt to exceed this value, then the transaction is split into two or more parts and partially committed. This setting was added to prevent Netware 3.1 server crashes when the specified Netware lock limit was exceeded, and to improve performance with both Netware and NT.
LockRetryLockRetry在返回锁定冲突消息前重复尝试访问锁定页的次数。默认值为 20。值为 REG_DWORD 类型。The number of times to repeat attempts to access a locked page before returning a lock conflict message. The default is 20. Values are of type REG_DWORD.
RecycleLVsRecycleLVs这个设置,启用时,将会导致 Microsoft Access 数据库引擎将回收多长时间的值 (LV) 页面 (备注、 长二进制 [对象] 和二进制数据类型)。This setting, when enabled, will cause the Microsoft Access database engine to recycle long value (LV) pages (Memo, Long Binary [OLE object], and Binary data types).值为 REG_DWORD 类型。Values are of type REG_DWORD.
MaxBufferSizeMaxBufferSize数据库引擎内部高速缓存的大小,以千字节 (K) 为单位。The size of the database engine internal cache, measured in kilobytes (K).MaxBufferSize 必须是一个大于或等于 512 的整数值。MaxBufferSize must be an integer value greater than or equal to 512.默认值基于下面的公式:((TotalRAM in MB - 12 MB) / 4) + 512 KB为例,在具有 32 MB 的 RAM 的系统,默认的缓冲区大小是 ((32 MB-12MB) / 4) + 512 KB 或 5632 kb 为单位。The default is based on the following formula: ((TotalRAM in MB - 12 MB) / 4) + 512 KB For example, on a system with 32 MB of RAM, the default buffer size is ((32 MB - 12 MB) / 4) + 512 KB or 5632 KB.若要设置为默认值的值,设置注册表项为MaxBufferSize=的类型 REG_DWORD 值是。To set the value to the default, set the registry key to MaxBufferSize= Values are of type REG_DWORD.
ThreadsThreads可用于 Microsoft Access 数据库引擎的后台线程数。默认值为 3。值为 REG_DWORD 类型。The number of background threads available to the Microsoft Access database engine. The default is 3. Values are of type REG_DWORD.
UserCommitSyncUserCommitSync指定系统是否等待提交完成。值“是”指示系统等待;值“否”指示系统异步执行提交。默认值为“是”。值为 REG_SZ 类型。Specifies whether the system waits for a commit to finish. A value of Yes instructs the system to wait; a value of No instructs the system to perform the commit asynchronously. The default is Yes. Values are of type REG_SZ.
ImplicitCommitSyncImplicitCommitSync指定系统是否等待以完成提交。值“否”指示系统继续,而不要等待完成提交;值“是”指示系统等待完成提交;默认值为“否”。值为 REG_SZ 类型。Specifies whether the system waits for a commit to finish. A value of No instructs the system to proceed without waiting for the commit to finish; a value of Yes instructs the system to wait for the commit to finish. The default is No. Values are of type REG_SZ.
ExclusiveAsyncDelayExclusiveAsyncDelay指定延迟异步刷新独占数据库的时间长度(以毫秒为单位)。默认值为 2000(即 2 秒)。值为 REG_DWORD 类型。Specifies the length of time, in milliseconds, to defer an asynchronous flush of an exclusive database. The default value is 2000, or 2 seconds. Values are of type REG_DWORD.
SharedAsyncDelaySharedAsyncDelay指定延迟异步刷新共享数据库的时间长度(以毫秒为单位)。默认值为 0。值为 REG_DWORD 类型。Specifies the length of time, in milliseconds, to defer an asynchronous flush of a shared database. The default value is 0. Values are of type REG_DWORD.
PagesLockedToTableLockPagesLockedToTableLock批量操作期间它通常会更有效: 即,锁定整个表,而不是获取每个单独页的表锁,当您尝试访问它。During bulk operations it is often more efficient to lock a whole table, instead of obtaining locks for each individual page of the table as you try to access it.此设置指定的 Microsoft Access 数据库引擎将允许 Access 数据库引擎尝试升级到独占表锁的默认值为 0 之前被锁定在任何特定的交易记录中的页面数表示Access 数据库引擎将永远不会自动更改从页锁定为表锁定。This setting specifies the number of pages that the Microsoft Access database engine will allow to be locked in any particular transaction before the Access database engine attempts to escalate to an exclusive table lock The default value of 0 indicates that the Access database engine will never automatically change from page locking to table locking.

请注意应谨慎使用此设置。Note This setting should be used carefully.如果需要多用户访问数据库,然后锁定整个表可能导致其他用户锁定冲突。If a database is needed for multi-user access, then locking a whole table could cause locking conflicts for other users.这是尤为严重,如果此设置使用了一小部分。This would be especially severe if a small number was used for this setting.甚至更多被使用时,例如 25 或 50,其他用户的操作可能会变得不可预知。Even when a larger number was used, such as 25 or 50, the operation for other users might become unpredictable.

请注意更改 Windows 注册表设置时,您必须退出并重新启动数据库引擎,新设置才能生效。Note When you change Windows Registry settings, you must exit and then restart the database engine for the new settings to take effect.

其他资源Additional resources

访问 MSDN 上的开发人员论坛Access for developers forum on MSDN
访问 support.office.com 上的帮助Access help on support.office.com
访问 answers.microsoft.com 上的帮助Access help on answers.microsoft.com
在必应上搜索特定的访问错误代码Search for specific Access error codes on Bing
访问 UtterAccess 上的论坛Access forums on UtterAccess
访问 UtterAcess 上的 wikiAccess wiki on UtterAcess
访问开发人员和 VBA 编程帮助中心 (FMS)Access developer and VBA programming help center (FMS)
访问 StackOverflow 上的帖子Access posts on StackOverflow

© 2018 Microsoft