得到系统默认备份路径: declare @path varchar(200) select @path = filename from master.dbo.sysfiles set @path = ltrim(REVERSE(@path)) set @path = REVERSE(substring(@path,CHARINDEX('/',@path)+5,len(@path))) print @path+'backup' 或者 sp_helpdb [DBNAME] 或者 select * from [DBNAME].dbo.sysfiles 或者 select * from sys.database_files