dbTalk Databases Forums  

DataFile and Log File

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss DataFile and Log File in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rogers
 
Posts: n/a

Default DataFile and Log File - 04-27-2007 , 03:58 PM






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



Reply With Quote
  #2  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: DataFile and Log File - 04-27-2007 , 04:22 PM






Have a look at the sys.database_files catalog view in BOL.

--
Andrew J. Kelly SQL MVP

"Rogers" <naissani (AT) hotmail (DOT) com> wrote

Quote:
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





Reply With Quote
  #3  
Old   
Roger
 
Posts: n/a

Default Re: DataFile and Log File - 04-28-2007 , 09:42 AM



In SQL Server 2000?

Thanks

"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote

Quote:
Have a look at the sys.database_files catalog view in BOL.

--
Andrew J. Kelly SQL MVP

"Rogers" <naissani (AT) hotmail (DOT) com> wrote in message
news:OsKzR7QiHHA.5008 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
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







Reply With Quote
  #4  
Old   
Hugo Kornelis
 
Posts: n/a

Default Re: DataFile and Log File - 04-28-2007 , 02:31 PM



On Sat, 28 Apr 2007 10:42:15 -0400, Roger wrote:

Quote:
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.

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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.