Is there a way to restore to a new - or even a different - database using SQL Backup 5?
Comments
1 comment
-
Yes. If you want to use the same database files as the original database, omit the MOVE options e.g.
EXEC master..sqlbackup '-sql "RESTORE DATABASE AdventureWorks_copy FROM DISK = [g:\backups\AdventureWorks.sqb]"'
If you want to create new database files, use the MOVE options e.g.EXEC master..sqlbackup '-sql "RESTORE DATABASE AdventureWorks_copy FROM DISK = [g:\backups\AdventureWorks.sqb] WITH MOVE [AdventureWorks_dat] TO [e:\sqldata\AdventureWorks_copy.mdf], MOVE [AdventureWorks_log] to [e:\sqldata\AdventureWorks_copy.ldf]"'
Add comment
Please sign in to leave a comment.