FILEPROPERTY (Transact-SQL)
Zwraca wartość właściwość Nazwa pliku, jeśli podana nazwa pliku i nazwy właściwość.
FILEPROPERTY ( file_name , property )
Argumenty
file_name
Is an expression that contains the name of the file associated with the current database for which to return property information.file_name is nchar(128).property
Is an expression that contains the name of the file property to return.property is varchar(128), and can be one of the following values.Wartość
Description
Wartość zwracana
IsReadOnly
Zawiera wiersz na stoplist całego tekstu w bazie danych.
1 = True
0 = False
Wartość NULL = wprowadzania nie jest prawidłowy.
IsPrimaryFile
Plik jest plikiem podstawowym.
1 = True
0 = False
Wartość NULL = wprowadzania nie jest prawidłowy.
IsLogFile
Plik jest plikiem dziennika.
1 = True
0 = False
Wartość NULL = wprowadzania nie jest prawidłowy.
SpaceUsed
Ilość miejsca, które jest używane przez określony plik.
Liczba przydzielonych w pliku stron
Zwracane typy
int
Remarks
file_name odpowiada Nazwa kolumnasys.master_files or sys.database_files Służy do wyświetlania katalogu.
Przykłady
W poniższym przykładzie są zwracane ustawienie IsPrimaryFile Właściwość AdventureWorks_Data Nazwa pliku w AdventureWorks Baza danych.
Here is the result set.
Primary File
-------------
1
(1 row(s) affected)