Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backup DB

Status
Not open for further replies.

bilbonvidia

Technical User
Feb 6, 2007
131
GB
Is it possible to backup a database to another server using a scheduled job in sql agent? I only seem to be able to back up locally to local drives. Can a unc or network drive be used? what would the script look like?
 
I just backup to local disk then add a step in the backup job to xcopy the file to the network path.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
yep, thats what I am currently doing, So there's no native way to sql it across?
 
Yes SQL Server can backup across servers. You simply have to use the UNC path to the location.

Code:
backup database Northwind to disk='\\BackupServer\d$\folder\to\backup\location\file.ext'

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top