I want to know the datafile and log file for the given input parameter. I am
basically creating function and the input parameter would be database name
and that will return me DataFile and the LogFile.
Can anybody tell me which query I have to used in the function. I have to
used to get the DataFile and LogFile
Have a look at the sys.database_files catalog view in BOL.

Signature
Andrew J. Kelly SQL MVP
>I want to know the datafile and log file for the given input parameter. I
>am basically creating function and the input parameter would be database
>name and that will return me DataFile and the LogFile.
>
> Can anybody tell me which query I have to used in the function. I have to
> used to get the DataFile and LogFile
Roger - 28 Apr 2007 15:42 GMT
In SQL Server 2000?
Thanks
> Have a look at the sys.database_files catalog view in BOL.
>
[quoted text clipped - 4 lines]
>> Can anybody tell me which query I have to used in the function. I have to
>> used to get the DataFile and LogFile
Hugo Kornelis - 28 Apr 2007 20:31 GMT
>In SQL Server 2000?
Hi Roger,
A more polite way to write this would have been; "Oh, I'm sorry I forgot
to include in my original post that I'm using SQL Server 2000. Is there
an alternative method for that version?"
The answer to that question would have been to check the sysfiles system
table in Books Online.

Signature
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis