Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions Links


SQL Server DBA Jobs

SQLCMD uses OLEDB as a client interface

30 March,2022 by Tom Collins

Question: When  the sqlcmd utility connects to a SQL Server ,what connection provider is used to interface with SQL Server ?    


Answer: SQLCMD uses OLEDB as client interface.   You can verify by checking the sys.dm_exec_sessions DMV

select * from sys.dm_exec_sessions where session_id > 50

You'll notice when the program = SQLCMD       the client_interface_name = ODBC  . When the program = Microsoft SQL Server Management Studio the client_interface_name = .Net SqlClient Data Provider

Why is this important ? 

There are differences between ODBC and .Net Sql Client Data Provider . 

1) SSMS uses the .Net SQLClient provider versus SQLCMD which executes across an ODBC provider .   If you are troubleshooting a performance issue - it is a consideration in how you are testing code . 


Read more on using sqlcmd

How to capture errors from SQLCMD

How to use a blank password with SQLCMD

Author: Tom Collins (


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on SQLCMD uses OLEDB as a client interface | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer