다음을 통해 공유


VacuumSchedule Constructor (Application, String)

Initializes a new instance of the VacuumSchedule class with an Application object and a name.

네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

구문

‘선언
Public Sub New ( _
    application As Application, _
    name As String _
)
public VacuumSchedule (
    Application application,
    string name
)
public:
VacuumSchedule (
    Application^ application, 
    String^ name
)
public VacuumSchedule (
    Application application, 
    String name
)
public function VacuumSchedule (
    application : Application, 
    name : String
)

매개 변수

  • application
    The parent Application for the data removal schedule.
  • name
    A String that specifies the name of the VacuumSchedule object. Notification Services does not use this name. This name is not used by Notification Services.

    You cannot change the name. To rename a vacuum schedule, you must remove the schedule and then add a new schedule that has the new name.

주의

During reflection, the name becomes the vacuum schedule ID that Notification Services generates when it adds the vacuum schedule to the application database.

When using this constructor, you must set the StartTime property.

This constructor sets the default value for the Interval property to 6 hours.

The following examples show how to create a schedule for removing obsolete data and then add the schedule to the collection of vacuum schedules for the application:

VacuumSchedule vacuumSchedule1 = new VacuumSchedule(
    myApplication, "1");
vacuumSchedule1.StartTime = new TimeSpan(23, 0, 0);
myApplication.VacuumSchedules.Add(vacuumSchedule1);
Dim vacuumSchedule1 As VacuumSchedule = _
    New VacuumSchedule(myApplication, "1")
vacuumSchedule1.StartTime = New TimeSpan(23, 0, 0)
myApplication.VacuumSchedules.Add(vacuumSchedule1)

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

VacuumSchedule Class
VacuumSchedule Members
Microsoft.SqlServer.Management.Nmo Namespace

관련 자료

데이터 제거 구성
VacuumSchedule Element (ADF)