DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE
 
 
SITE SEARCH SQLUSA.com VIDEOS
 
 
SQL E/BOOKS   WORLD, USA & SQL NEWS   FORMAT
SCRIPTS SQL 2005 SQL 2008 ARTICLES
How to execute a cmd file?

The following sample copy file command shell can be saved into a file called weeklybackup.cmd (or weeklybackup.bat):

 

XCOPY D:\backup\accountmaster.bak \\ServerIP\D$\backup\accountmasterweekly.bak /Q

 

The cmd file can contain other operating system commands as well. It can be executed from xp_cmdshell or SQL Server Agent just by giving the name "weeklybackup.cmd".

To turn off echo, include as first line @ECHO OFF.

Related article:

Batch Files (Scripts) in Windows

 

Exam Prep 70-461
SQL 2016 DESIGN & PROGRAMMING
 
 
 
DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE