OLEDB Wait Type In SQL Server

Most commonly, the DBAs come across a wait type known as OLEDB. The OLEDB wait type means Object Linking and Embedding Database. There could be many reasons the SQL Server uses the OLEDB Client Provider. Whenever it does so, the SQL Server records the wait time on the OLEDB wait type.

What is the OLEDB Wait Type?

The OLEDB Wait Type is a wait type that occurs whenever the SQL Server must access another SQL Server instance. It can be from one machine to another or from one instance to another. One example of OLEDB wait comes in the scene when there is a linked server used to move the traffic of respective instances to another. The OLEDB wait type can also get generated when the data gets gathered from outside sources into the SQL Server machine.

There could be instances where you might get to notice the usage of OLEDB Client Provider even when the data is moving internally in your SQL Server. Such can be seen while using the DBCC commands.

Example of OLEB demonstration:

Step 1: Clear the entries from the sys.dm_os_wait stats

DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR);

OLEDB Wait Type SQL Server 1


Step 2: Run the DBCC CHECKDB command for your database

DBCC CHECKDB('SQLArena_Test');

Step 3: Check the entry again from the sys.dm_os_wait_stats to see the OLEDB wait type generated

SELECT *
FROM sys.dm_os_wait_stats
WHERE wait_type = 'OLEDB';

OLEDB Wait Type SQL Server 2


If you notice from the above example demonstration, the OLEDB wait type gets generated when the DBCC command is run. It means that the DBCC makes use of the Client Provider. 

Lowering OLEDB Waits

The OLEDB wait type is one of the performance-indicating wait types in SQL Server. Here are some occurrences of OLEDB Waits and the ways to monitor them.

  • If you are querying information from a linked server, and the same has been taking a while to connect to the remote machine, the OLEDB waits can go high. Try to increase the availability of remote server instances. 
  • If there is a network intermittent issue between the source to the remote server, then again the OLEDB waits can go high. Try to make sure the network is good always to increase the performance of your application. 

Bottomline

The OLEDB wait type occurs mainly due to the use of Object Linking and Embedding Client Provider. In more cases, the OLEDB wait types are not performance issues. But on the other hand, it is a wait type that should not be ignored too. It is always a good practice to keep a look at this wait type if your production server is more relying on the remote instance.

Here are more wait types for your reference:
CHECKPOINT_QUEUE Wait Type In SQL Server
DIRTY_PAGE_POLL Wait Type In SQL Server
MSQL_XP Wait Type In SQL Server

0 comments:

Post a Comment