A common task for a DBA is to restore a database to a new location. The script for the same is given below

The above command restores the Adventureworks2014 database to AdventureWorks database. The primary data file is created at e:\ahmad\data and log file is created at e:\ahmad\log folder.

In order to get the original database file location run below command

sql server restore database with move

Happy learning!!!


Like us on FaceBook Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook