DECLARE @DBAddress nvarchar(4000),@Address nvarchar(4000),
@Index int
SELECT @DBAddress=[filename]
FROM master.dbo.sysdatabases where name = (select db_name())
SET @Index=CHARINDEX('\DB\',@DBAddress)
SET @Address=SUBSTRING(@DBAddress,1,@Index)