Skip to content

Est. 2011ยทMicrosoft Partner 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

License Error 0x80070020

Outlook 0x80070020: The OST File Is In Use and Locked by Another Process

10 min read Updated October 5, 2026 Outlook & Office Applications

Fix it now

Windows is refusing to let Outlook open its data file because another process already holds it. 0x80070020 is Win32 error 32, ERROR_SHARING_VIOLATION, and the fix is to find the holder rather than repair anything.

Run these in PowerShell on the affected machine, in order

Get-Process outlook -ErrorAction SilentlyContinue | Stop-Process -Force
resmon
  1. In Resource Monitor, open the CPU tab and type .ost into the Associated Handles search box. The list names every process holding the file.
  2. If the holder is a backup agent, a sync client or a scanner, stop that service or wait for its job to end, then start Outlook.
  3. Add an exclusion in your security product for the folder holding the data files and for the offline and personal data file types. Microsoft Defender supports file, folder, file-extension and process exclusions.
  4. Take the same folder out of scope for any file synchronisation client and out of any folder redirection policy.
  5. Sign out of Windows and back in, then start Outlook.

An .ost for an Exchange, Microsoft 365 or IMAP account is a cache of a server mailbox. A .pst is not. Never treat the two the same way when you are tempted to delete one.

If Outlook opens and stays open through a full backup and scan window, you are done. The next section explains why the lock happens and how to tell the four holders apart.

Why it happens

Outlook opens its data file exclusively. The file is a database being written continuously, and two writers would destroy it, so the open call asks Windows for a sharing mode that excludes everyone else. When another process already holds a conflicting handle, the request fails and Windows returns error 32. Outlook surfaces that as 0x80070020, and it is the same sharing violation you would get trying to delete a file that Word has open.

The neighbouring code is narrower. 0x80070021 is Win32 error 33, ERROR_LOCK_VIOLATION: another process has locked a portion of the file rather than the whole thing. In practice both arrive from the same population of processes, and the diagnosis is identical.

0x8004010B is the messaging layer’s version of the same jam. Microsoft publishes it as ServerBusy: a table operation failed because a separate operation was in progress at the same time. It is not a file-system code and it does not name a holder, so treat it as corroboration rather than as a clue.

Four kinds of process account for nearly every case, and knowing which one you have decides the fix. A real-time scanner reading the file every time it changes. A backup or endpoint agent walking the user profile on a schedule. A synchronisation client treating the local application data folder, or a redirected version of it, as content to upload. And Outlook itself, left running after a crash, a fast user switch or a forced sign-out.

An orphaned Outlook process still owns the handle

You have this one if There is no Outlook window, but a process is listed on the Details tab of Task Manager, and the machine crashed or was signed out abruptly.

  1. Run Get-Process outlook | Stop-Process -Force from PowerShell. -Force stops it without a confirmation prompt.
  2. If the process will not end, sign out of Windows and back in; the handle dies with the session.
  3. Confirm in Resource Monitor that nothing holds a handle to the file any more.
  4. Start Outlook.

Real-time scanning is holding the data file

You have this one if Resource Monitor names your security product against the handle, and the failures line up with scan activity rather than with anything you did.

  1. Add an exclusion covering the folder that holds the data files, following your vendor’s own documentation for the syntax.
  2. Microsoft Defender Antivirus supports file and folder exclusions, file-extension exclusions and process exclusions; a folder exclusion is the one you want here.
  3. Restart the machine and test through a full working day rather than declaring success after one launch.

An exclusion here is not the same as turning mail protection off. Attachments are still scanned when they are written to disk and opened, and the mail service filters messages long before they reach the client.

A backup or endpoint agent opens the file on a schedule

You have this one if Failures happen at the same time each day and the handle belongs to a backup service.

  1. Move the job outside working hours where the product lets you.
  2. Prefer a product that snapshots the volume rather than reading live files.
  3. Exclude the .ost from backup entirely. It is a cache of a server mailbox and backing it up buys you nothing you cannot rebuild by deleting it.

A synchronisation client is uploading the file

You have this one if The handle belongs to a sync client, and the user profile or Documents folder is being synchronised to cloud storage.

  1. Take the Outlook data folder out of the sync client’s scope, and out of folder redirection policy where one is in force.
  2. Move any .pst out of a synchronised folder to a local path, then reattach it in Outlook.
  3. Where known folder move to cloud storage is in use, keep the Outlook folder outside it.

Full reference

Reading the pattern before you change anything

Symptom Where the fault is
Opens after a reboot, fails later in the day A scheduled agent holding the file during its window
Fails immediately, every time A resident process: a scanner or a sync client
Fails for one user on a shared machine That session left an Outlook process behind
The data file path is a UNC or redirected path Folder redirection; move the file to a local disk
Personal data files affected too The same class of lock, needing a wider exclusion

What each code is actually telling you

Code Published meaning Layer
0x80070020 The process cannot access the file because it is being used by another process Windows file system
0x80070021 The process cannot access the file because another process has locked a portion of the file Windows file system
0x8004010B A table operation failed because a separate operation was in progress at the same time Messaging layer

Deleting the cache, safely

Where the account is Exchange, Microsoft 365 or IMAP, the offline data file is disposable and rebuilding it is the fastest way past a file that will not behave. Close Outlook, confirm nothing holds a handle, rename the file with a .old suffix rather than deleting it, and start Outlook. It creates a new cache and downloads the mailbox again. Give the first synchronisation time on a large mailbox before judging performance.

A personal data file is a different object. It is the only copy of whatever is in it, and the same locking symptoms against one call for patience rather than a rename. Find the holder, release it, and leave the file alone.

Where the data files live

  • The default location for offline data files is under the user’s local application data, in a Microsoft\Outlook folder.
  • Confirm the real path for a specific profile in Outlook under File, Account Settings, Data Files. That page lists every file the profile mounts and where each one is.
  • Outlook data files on a network share or a mapped drive are the arrangement that produces this error most reliably. Keep them on a local disk.

When the usual four are ruled out

  • Check whether the machine has more than one security product installed. Two real-time scanners on one machine will fight over the same file and each will look innocent when tested alone.
  • Check for a search indexer or a legal-hold agent; both read user profiles on a schedule and both are easy to forget.
  • Look at the Application log in Event Viewer around the time of the failure for a matching entry from the product holding the handle.
  • On a terminal server or shared machine, check whether another user’s session still has the profile loaded.

When a licence is the actual fix

Adding an exclusion costs nothing and every serious security product supports one, including the antivirus built into Windows. Microsoft Defender Antivirus documents file, folder, file-extension and process exclusions, so on a small estate this is a configuration change and not a purchase. A licence becomes part of the answer only where the product in use cannot be configured centrally, where exclusions are wiped by every policy refresh, or where the product is out of licence and therefore unmanaged. Arco supplies business antivirus licences from the main vendors and can tell you which of them publish documented exclusions for Outlook data files and which let you push those exclusions from a console rather than machine by machine. Be clear what that buys: manageability across a fleet. It does not buy a different fix, because the fix is an exclusion either way.

Every code this article covers

Code What it points at Source
0x80070020 Win32 error 32, ERROR_SHARING_VIOLATION: the process cannot access the file because it is being used by another process Microsoft Learn
0x80070021 Win32 error 33, ERROR_LOCK_VIOLATION: the process cannot access the file because another process has locked a portion of the file Microsoft Learn
The Outlook data file (.ost) is in use and cannot be accessed The dialog Outlook shows when the open fails; Microsoft does not publish this string with a documented cause not published by the vendor
0x8004010B ServerBusy: a table operation failed because a separate operation was in progress at the same time Microsoft Learn

Confirm the fix worked

  1. Outlook opens and the mailbox synchronises.
  2. Resource Monitor shows only the Outlook process holding a handle to the data file.
  3. The exclusion is visible in the security product’s own configuration, not just in your notes.
  4. Outlook still opens after a full backup and scan window has run.
  5. A reboot does not bring the lock back.

Questions people ask about this

Can I just delete the offline data file?

For an Exchange, Microsoft 365 or IMAP account, yes, once you have confirmed nothing exists only locally. The file is a cache and Outlook rebuilds it on the next start. Rename it rather than deleting it so you have a way back. For a personal data file the answer is no: that file is the data.

Which exclusions should I add?

The folder holding the data files, plus the offline and personal data file types. Your vendor’s documentation is authoritative because exclusion syntax and scope differ between products. Microsoft Defender takes file, folder, extension and process exclusions.

Why did this start after we installed backup software?

Because the agent opens the file to read it, and a file being read cannot always be opened exclusively at the same moment. Excluding the offline file from backup solves it and loses nothing, because the server mailbox is the real copy.

Do I need to change antivirus product?

Rarely. Any product that supports exclusions can be configured to stay out of the way, and that is free. It becomes a purchase only when the product you have cannot be configured centrally, or is unlicensed and therefore unmanaged.

The handle belongs to System. What now?

That usually means the file is on a share and the handle is the server service holding it for a remote client. Move the data file to a local disk; Outlook data files across a network link are the arrangement this error exists to warn you about.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

License Error Outlook 0x8004060C: The Mailbox or Outlook Data File Has Hit Its Size Limit Free Fix OneDrive and Office Sign-in Error 0x8004DE40: Login Was Interrupted or Unsuccessful Free Fix Autodiscover 0x80072EE7 and 0x80072EFD: Outlook Cannot Reach the Discovery Endpoint License Error Unlicensed Product 0xC004F017 in Word, Excel, Visio and Project: Activation Failed
โ† Back to Knowledge Base