title: Error with the procedure written to Back up and restore the DB
body: <p>I have written the below SP and getting below error. Could  any one please help me finding the error.</p>
  
  <pre><code>create procedure CopyDB(@DBName varchar(100),@Newname varchar(100))
  as
  DECLARE @FileName AS nvarchar(4000)
  set @FileName = 'D:\'+@DBName+'.bak'
  /*Backup the database*/
  BACKUP DATABASE @DBName
  TO DISK = @FileName
  WITH CHECKSUM, INIT;
  /*to restore it with new name*/
  RESTORE database @Newname
  FROM DISK = @FileName
  with 
  MOVE @DBName TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\'+@Newname+'.mdf',
  MOVE @DBName TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\'+@Newname+'_log.LDF',
  CHECKSUM;
  </code></pre>
  
  <p>Error message is :</p>
  
  <blockquote>
    <p>Msg 102, Level 15, State 1, Procedure CopyDB, Line 13 Incorrect syntax near '+'.</p>
  </blockquote>