List all files

SQL Server 2000

select d.name, f.name, f.filename from sysaltfiles f inner join sysdatabases d on (f.dbid = d.dbid) order by 1,2

SQL Server 2005/8

select d.name, m.name, m.physical_name from sys.master_files m inner join sys.databases d on (m.database_id = d.database_id) order by 1, 2