How to use the WITH MOVE when you don’t know the logical database file names.

Published On: 2011-05-30By:

When doing a database restore and you want to move the physical database files from one disk to another, or from one folder to another you need to know the logical file names.  But if you can’t restore the database how do you get these logical file names?  By using the RESTORE FILELISTONLY syntax of the restore command.

The syntax is very simple for this statement.

RESTORE FILELISTONLY FROM DISK=’D:PathToYourBackupFile.bak’

The record set which will be returned will give you the logical names, as well as the physical names of the database files which you can then use within the RESTORE DATABASE command.

Denny


Contact the Author | Contact DCAC

Video

Globally Recognized Expertise

As Microsoft MVP’s and Partners as well as VMware experts, we are summoned by companies all over the world to fine-tune and problem-solve the most difficult architecture, infrastructure and network challenges.

And sometimes we’re asked to share what we did, at events like Microsoft’s PASS Summit 2015.

Awards & Certifications

Microsoft Partner    Microsoft MVP    Microsoft Certified Master    VMWare Partner    VMWare vExpert
   Best Full-Service Cloud Technology Consulting Company    Insights Sccess Award    Technology Headlines Award    Golden Bridge Gold Award    CIO Review Top 20 Azure Solutions Providers
Share via
Copy link