EventChronicleRule.ActionTimeout Property
Gets or sets the interval during which the Transact-SQL statements specified in the Action must complete.
命名空間: Microsoft.SqlServer.Management.Nmo
組件: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
語法
'宣告
Public Property ActionTimeout As TimeSpan
public TimeSpan ActionTimeout { get; set; }
public:
property TimeSpan ActionTimeout {
TimeSpan get ();
void set (TimeSpan value);
}
/** @property */
public TimeSpan get_ActionTimeout ()
/** @property */
public void set_ActionTimeout (TimeSpan value)
public function get ActionTimeout () : TimeSpan
public function set ActionTimeout (value : TimeSpan)
屬性值
A TimeSpan object that specifies the action timeout.
範例
The following example shows how to create an event chronicle rule that simply copies all events to a chronicle:
// Define the event chronicle rule
EventChronicleRule ec1Rule =
new EventChronicleRule(flightEvents,
"FlightEventChronicleRule");
ec1Rule.Action = "INSERT MyAppSchema.FlightEventChronicle " +
" (LeavingFrom, GoingTo, Price) " +
" SELECT LeavingFrom, GoingTo, Price " +
" FROM MyAppSchema.FlightEvents;";
ec1Rule.ActionTimeout = new TimeSpan(0, 1, 20);
flightEvents.EventChronicleRule = ec1Rule;
' Define the event chronicle rule
Dim ec1Rule As EventChronicleRule = _
New EventChronicleRule(flightEvents, _
"FlightEventChronicleRule")
ec1Rule.Action = _
"INSERT MyAppSchema.FlightEventChronicle " + _
" (LeavingFrom, GoingTo, Price) " + _
" SELECT LeavingFrom, GoingTo, Price " + _
" FROM MyAppSchema.FlightEvents;"
ec1Rule.ActionTimeout = New TimeSpan(0, 1, 20)
flightEvents.EventChronicleRule = ec1Rule
執行緒安全性
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
平台
開發平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
目標平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
請參閱
參考
EventChronicleRule Class
EventChronicleRule Members
Microsoft.SqlServer.Management.Nmo Namespace