SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Correct the Syntex for : Backup Locally and then C
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 11/10/2011 :  08:05:39  Show Profile  Reply with Quote

I have Syntax to Backup SQL DataBase Locally and then Copy to the Network Share.

My Local Path is D:\db and Share Path C:\Data and backupfile : dbP.bak
DataBase Name : hospitaA

Please correct the Syntax to use it.

The Syntax :
SET LocalFolder=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBackup
SqlCmd -E -Q “Backup Database MyDB To Disk=’%LocalFolder%MyDB.bak’”
XCopy “%LocalFolder%MyDB.bak” “\” /Z /V
DEL “%LocalFolder%MyDB.bak”

Pankaj Kumar
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000