Skip to main content

 

Druva Documentation

Set SQLCMD path

Phoenix Editions: File:/tick.png Business File:/cross.png Enterprise File:/tick.png Elite

This article describes how to set the SQLCMD utility path to point to its installation folder.

Note: This article is applicable for SQL server agents 4.6.5 and earlier. 

Why set the SQLCMD utility path

The SQLCMD utility is an out-of-the-box command-line utility that comes with SQL servers 2005 and later. The SQLCMD utility allows you to execute Transact-SQL statements and scripts that are ad-hoc and interactive in nature. This execution is similar to working at the command prompt. To know more about the SQLCMD utility, see this article in the Microsoft library. 
To ensure that backups and restores from your SQL servers complete successfully, you must ensure that the system variable path for SQLCMD utility is set to point to the installation of the SQLCMD utility. At the time of a backup or restore, if Phoenix cannot find this path, backups or restores will fail. To avoid this issue, manually set the SQLCMD environment variable path to point to the installation folder of this utility.

Before you begin

Before setting the SQLCMD path, ensure that you have the full path to the utility.

  • For SQL Server 2012, the path is: <drive>:\Program Files\Microsoft SQL Server\100\Tools\Binn
  • For SQL Server 2008, the path is: <drive>:\Program Files\Microsoft SQL Server\110\ Tools\Binn

Procedure

  1. Navigate to Control Panel > System and Security > System
  2. Click Change settings.
  3. Click the Advanced tab. 
  4. On the System Properties window, click Environment Variables
  5. Under System Variables, click New
  6. On the New System Variable window, type a name for this system variable in the Variable Name box, and in the Variable value box, type the path to the SQLCMD utility.
  7. Save your changes. 
  • Was this article helpful?