달력

11

« 2024/11 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
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



:
Posted by Elick