What are the differences between osql, isql, and sqlcmd?

Use sqlcmd– it’s the most fully featured product.

  • sqlcmd: The newest, fanciest command-line interface to SQL Server.
  • isql : The older, DB-Library (native SQL Server protocol) way of command-line communication with SQL Server.
  • osql : The older, ODBC-based way of command-line communication with SQL Server.

EDIT: Times have changed since I replied on this a couple of years ago. Nowadays, you can also use the invoke-sqlcmd cmdlet in PowerShell. If you’re used to PowerShell or plan to do any scripting of any sophistication, use this instead.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)