BACKUP and RESTORE SQL DataBase across Network

BACKUP DATABASE databaseName TO DISK = ‘\\serverHostName\folder\backupName.bak’  WITH INIT

RESTORE DATABASE [databaseName]
FROM DISK = N‘\\serverHostName\folder\backupName.bak’
WITH FILE = 1,
MOVE N‘mdfSourceFileName’ TO N‘C:\folder\databaseName.mdf’,
MOVE N‘ldfSourceFileName’ TO N‘C:\folder\databaseName.ldf’,
NOUNLOAD, STATS = 10

more info http://www.sqlteam.com/article/backup-and-restore-in-sql-server-full-backups

http://msdn.microsoft.com/en-us/library/ms179313.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s