다음을 통해 공유


LastLogBackupDate 속성

트랜잭션 로그가 마지막으로 백업된 날짜 및 시간을 가져옵니다.

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

구문

‘선언
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Expensive Or SfcPropertyFlags.Standalone)> _
Public ReadOnly Property LastLogBackupDate As DateTime
    Get
‘사용 방법
Dim instance As Database
Dim value As DateTime

value = instance.LastLogBackupDate
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone)]
public DateTime LastLogBackupDate { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Expensive|SfcPropertyFlags::Standalone)]
public:
property DateTime LastLogBackupDate {
    DateTime get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone)>]
member LastLogBackupDate : DateTime
function get LastLogBackupDate () : DateTime

속성 값

유형: System. . :: . .DateTime
트랜잭션 로그가 마지막으로 백업된 날짜와 시간을 지정하는 DateTime 개체 값입니다.

VB

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server

'Reference the AdventureWorks2008R2 database.
Dim db As Database
db = srv.Databases("AdventureWorks2008R2")

'Display date data for the database.
Console.WriteLine(db.Name)
Console.WriteLine("Created on " + db.CreateDate)
Console.WriteLine("Last backed up on " + db.LastBackupDate)
Console.WriteLine("Log last backed up on " + db.LastLogBackupDate)

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2008R2")

Write-Host $db.Name
Write-Host "Created on " $db.CreateDate
Write-Host "Last backed up on " $db.LastBackupDate
Write-Host "Log last backed up on " $db.LastLogBackupDate