RESTORE FILELISTONLY FROM DISK = N'path to bak file' WITH FILE = 1 GO
world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
Monday, July 13, 2015
How to get sql server bak file logical name
Use WITH MOVE to identify a valid location for the file.
USE [master] GO RESTORE DATABASE [DBName] FROM DISK = N'Path to BAK File' WITH FILE = 1, MOVE N'Logical File Name' TO N'New Path to mdf file', MOVE N'Logical File Log Name' TO N'New Path to log file', NOUNLOAD, REPLACE, STATS = 1 GO
RESTORE FILELISTONLY FROM DISK = N'path to bak file' WITH FILE = 1 GO
Subscribe to:
Comments (Atom)