Page tree

 

 

 

Close

How satisfied are you with our online help?*

Just these help pages, not phone support or the product itself

0
1
2
3
4
5
Very dissatisfied
Very satisfied

Why did you give this rating?

Anything else you want to tell us about the help?

These instructions require technical expertise

Make sure you know what you're doing and are using one of the products listed. If you're not sure, ask your IT professional or MYOB.

Article ID: 31569

Accountants Office Suite
Australia
New Zealand
AO Practice Manager (NZ)
AO Classic Practice Management (AU)
AO Classic (NZ)

ARTICLE LAST UPDATED: 20/10/2015 2:44:00 AM

If you're running Windows 10 build 1803 or later, refer to KB 39259: Errors in AE/AO after upgrading to Windows 10 build 1803

The error message: "2066/Index file [filename].CDX is corrupt. Please rebuild it."? This error reoccurs, even after indexes have been rebuilt.

The FoxPro error: "2066/Index file [filename].CDX is corrupt. Please rebuild it" occurs on network systems that have a Server 2008 operating system with workstations running Windows Vista, Windows 7 or 2008 Terminal Server; or peer-to-peer networks where the server/workstation is running a Windows Vista or Windows 7 operating system, and one or more other workstations are also using a Windows Vista or Windows 7 operating system.
The error message may be one of the following:

  • "2066/Index file ...\WORKLOG.CDX is corrupt. Please rebuild it."
  • "2066/Index file ...\DEBTORS.CDX is corrupt. Please rebuild it."
  • "2066/Index file ...\DEBTTRAN.CDX is corrupt. Please rebuild it."
  • "2066/Index file ...\STEPSCHL.CDX is corrupt. Please rebuild it."

Firstly, to fix the error, please reindex the affected module(s) in MYOB Accountants Office.

This will require all users to close MYOB Accountants Office on all workstations.

Cause

This issue occurs because a user queries the local cache for attributes of a shared file regardless of the opportunistic lock status in the SMB2 environment. When other users change the shared file, the original user obtains incorrect file attributes if the local cache is not updated in time. Therefore, a data corruption issue occurs.

This issue is described in Microsoft's KB 2028965, and provides Hotfix files for Windows Vista, and Windows 7/Server 2008 operating systems. This Hotfix was included in Windows 7 & Server 2008 R2 SP1, so cannot be applied to any Windows 7 or Server 2008 R2 system running SP1 or greater.

Microsoft have released an updated hotfix for Windows 7 and Server 2008 this is found in Microsoft KB 2618096.

Workaround:

To work around this issue, try disabling Opportunistic Locking as per KB 34204.

Background:

Here is a description of SMB 2.0 [1]:

Server Message Block Protocol (SMB) is the file sharing protocol used by default on Windows-based computers. SMB 1.0 was designed for early Windows network operating systems such as Microsoft LAN Manager and Windows for Workgroups, but until Windows Server 2008 and Vista/Win7, all Microsoft-based operating systems continued to use it more or less in its original format.

SMB 2.0 was introduced in Windows Vista and Windows Server 2008. SMB 2.0 is designed for the needs of the next generation of file servers. Windows Server 2008 and Windows Vista/Win7 support both SMB 1.0 and SMB 2.0 in order to preserve backward compatibility. [2]

While SMB 2.0 seems to do a good job if BOTH client and server O/S's support it, in some cases it will slow things down. The reason for this is that the version of SMB used for file sharing is determined during the SMB session negotiation. If both the client and server support SMB 2.0, then SMB 2.0 is selected during the initial negotiation. However, if they don't both support it, SMB 1.0 will be used to in order to preserve backwards compatibility.

The SMB protocol version to be used for file operations is decided during the negotiation phase. During the negotiation phase, a Windows Vista/Win7 client advertises to the server that it can understand the new SMB 2.0 protocol. If the server (Windows Server 2008 or otherwise) understands SMB 2.0, then SMB 2.0 is chosen for subsequent communication. Otherwise the client and server use SMB 1.0.

When using the terms "client" and "server" in case of file and print sharing, it does not necessarily mean that a client-type OS such as Vista "always" connects to a server-type Os such as Windows Server 2008. Sometimes, a Vista/Win7 computer will connect to another Vista/Win7 computer, and in that case, the computer that is "serving" the shares is considered to be the "server".

  • When a Windows Server 2008/Vista/Win7 "client" connects to a Windows Server 2008/Vista/Win7 "server", SMB 2.0 is used.
  • When a Windows Server 2008/Vista/Win7 "client" connects to a Windows 2000/XP/2003 "server", SMB 1.0 is used.
  • When a Windows 2000/XP/2003 "client" connects to a Windows Server 2008/Vista/Win7 "server", SMB 1.0 is used.
  • When a Windows 2000/XP/2003 "client" connects to a Windows 2000/XP/2003 "server", SMB 1.0 is used.

Windows Vista was released in November 2006, and was the first operating system to use SMB 2.0. A Microsoft forum post from March 2007 highlights SMB 2.0 issues with Visual FoxPro (VFP) and Microsoft Access (MDB) databases on servers running Windows Vista, and links to a Microsoft KB935366 detailing a hotfix. [3]

Microsoft also released a Knowledgebase article KB950836 which includes instructions (steps 1-8 above) on how to disable SMB 2.0.

Trevor Ha, a Moderator for Microsoft's Visual FoxPro Developer Center Forum says: "…More recently, we have seen serious issues in many file-based database systems (FoxPro and Access being the most prominent) as people move to more contemporary operating systems which use SMB2. Disabling SMB2 seems to resolve the issue quite often." [4]

...So the issue is not an MYOB Accountants Office issue, but one with Microsoft Visual FoxPro, and something that cannot be fixed by changing program code.

Sources:

[1] http://www.petri.co.il/how-to-disable-smb-2-on-windows-vista-or-server-2008.htm

[2] http://technet.microsoft.com/en-us/library/bb726965.aspx

[3] http://fox.wikis.com/wc.dll?Wiki~WindowsVistaFileLockingBug

[4] http://social.msdn.microsoft.com/Forums/en-US/visualfoxprogeneral/thread/6c62418d-08f8-495a-bbd4-f93151ec1f05/