Link to home
Start Free TrialLog in
Avatar of rajneetbhatia
rajneetbhatia

asked on

Retrieve logical file name from .bak file

Hi,

Please let me know how can i retrieve the logical file name if I have the .bak file i.e I want to know the file name for mdf and ldf files.

Regards,
R S
ASKER CERTIFIED SOLUTION
Avatar of ram2098
ram2098

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rajneetbhatia
rajneetbhatia

ASKER

Thanks a lot.., I am able to get the logical name.

Please let me know is it possible to get the database name.., if yes how..?


Waiting for reply.

Regards,
R S
Hi,

How can I get the database name if I know the .bak file name.

Regards,
R S
RESTORE HEADER ONLY FROM DISK = 'c:\yourfile.bak'
sorry without space in between...

RESTORE HEADERONLY FROM DISK = 'c:\yourfile.bak'