use master
declare @DBName sysname
set @DBName = '<ユーザーDB名>'
-- Data file
select name, physical_name
from sys.master_files
where database_id = db_id(@DBName)
and type_desc = 'ROWS'
-- Log file
select name, physical_name
from sys.master_files
where database_id = db_id(@DBName)
and type_desc = 'LOG'
最近のコメント