Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

backup and restore script

$
0
0

Hi

I’ve set up a backup and restore script. Both scripts work fine, but I want to be sure, that:

1. I have a FULL backup, (script fragment):

SET @fileName = @path + @name + '_' + @fileDate + '.BAK' 

       BACKUP DATABASE @name TO DISK = @fileName

Is this a full backup?

2. I have a full restore, (script fragment):

RESTORE DATABASE [Test1]

 FROM DISK = N'C:\Test1_20140201_7_20_55.bak'

 WITH FILE = 1, MOVE N'Test1' TO N'F:\SQLdata\MSSQL11.MSSQLSERVER\MSSQL\DATA\Test1.mdf',

 MOVE N'Test1_Log' TO N'F:\SQLdata\MSSQL11.MSSQLSERVER\MSSQL\DATA\Test1_log.ldf', NOUNLOAD, REPLACE, STATS = 10

 GO

Is this a full restore?

Tell me, if I need to add any code, to have ALL data after restoring my database to the destination SQL instance.

Patrick


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>