2009. 2. 11. 17:37
MSSQL File 정보 Work/SQL Server2009. 2. 11. 17:37
별거 아니지만...
일단 기록해 두자..
-- MSSQL 2000
SELECT @@ServerName, RTRIM(D.name), RTRIM(MF.name), RTRIM(MF.filename)
FROM master.sysaltfiles MF
INNER JOIN master.sysdatabases D ON MF.dbid = D.dbid
ORDER BY D.dbid, MF.fileid
-- MSSQL 2005
SELECT @@ServerName, D.name, MF.name, MF.physical_name
FROM master.sys.master_files MF
INNER JOIN master.sys.databases D ON MF.database_id = D.database_id
ORDER BY D.database_id, MF.file_id
일단 기록해 두자..
-- MSSQL 2000
SELECT @@ServerName, RTRIM(D.name), RTRIM(MF.name), RTRIM(MF.filename)
FROM master.sysaltfiles MF
INNER JOIN master.sysdatabases D ON MF.dbid = D.dbid
ORDER BY D.dbid, MF.fileid
-- MSSQL 2005
SELECT @@ServerName, D.name, MF.name, MF.physical_name
FROM master.sys.master_files MF
INNER JOIN master.sys.databases D ON MF.database_id = D.database_id
ORDER BY D.database_id, MF.file_id