title: Calling batch file from SQL CLP Script
body: <p>Hi I need to run a batch file from a sql-clp script:</p>
  
  <p>The script is </p>
  
  <pre><code> CONNECT TO MYTAB1 USER xxxx using yyyyyyy;
   QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;
   CONNECT RESET;
   BACKUP DATABASE MYTAB1 TO "C:\temp\bcks" WITHOUT PROMPTING;
   CONNECT TO MYTAB1 USER xxxx using yyyyyyy;
   UNQUIESCE DATABASE;
   CONNECT RESET;
   cmd.exe /c "C:\Users\xxxx\Desktop\backup_neu.bat C:\temp\bcks C:\temp\bcks\zips 7z"); 
  </code></pre>
  
  <p>It runs great until it reaches the last line.
  I tried </p>
  
  <pre><code> cmd.exe /c 
   exec(' xp_cmdshell ''script_here'); 
   EXEC master..xp_CMDShell '"script here "'
  </code></pre>
  
  <p>but nothing worked.</p>
  
  <p>OI have DB2 v10 running. </p>
  
  <p>Any ideas on how I can get the batch file running?</p>
  
  <p>Thanks for all your help.</p>
  
  <p>TheVagabond</p>