I am trying to run a batch file that has the following command on a 64-bit Win7 Machine:
RESTORE DATABASE Sample FROM DISK = '%ProgramFiles(x86)%\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\Sample.bak' WITH REPLACE;
And am getting the following response:
Cannot open backup device 'c:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Backu
t SQL Server\MSSQL.1\MSSQL\Backu
.bak'. Operating system error 3(The system cannot find the path specified.).
I tried looking up the proper syntax for using Environment Variable in SQL commands to no avail.
Your help is deeply appreciated.