Friday, October 08, 2010

Transfer Backup File to another server do not use xp_cmdshell

By default in SQL Server 2005 and 2008 xp_cmdshell is disabled for security reason.

Instead of using xp_cmdshell you can create batch file to transfer bak file copy to another server

The TransferBackupFile contains the following line of command




Copy E:\mssql\backup\mydb.bak \\ServerName\E$\MSSQL\Backup  /y