sqlcool
SSC Eights!
Points: 967
More actions
August 5, 2010 at 7:05 pm
#142335
Hi there
I want to get the logical file name (logical name of mdf and logical name of ldf) of a .bak file using script
Cheers
Adiga
One Orange Chip
Points: 27284
August 5, 2010 at 9:06 pm
#1203233
You may use RESTORE FILELISTONLY as in the below example.
RESTORE FILELISTONLY FROM DISK='E:\MyBackup.bak'
Pradeep Adiga Blog: sqldbadiaries.comTwitter: @pradeepadiga
balaji.ganga
SSCrazy
Points: 2280
August 5, 2010 at 10:30 pm
#1203245
Hi,
If you want to see a particular database logical name. you can run this query
select * from sysfiles.
otherwise, u want to see logical name for all databases. you can use this query
use master
select * from sysaltfiles
Thanks & Regards
Balaji.G
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply