StatusInfoRefetchInterval Property
Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.
The StatusInfoRefetchInterval property controls the periodic, automatic update of status information maintained in SQL Distributed Management Objects (SQL-DMO) objects.
구문
object
.StatusInfoRefetchInterval(StatusInfo) [= value]
Parts
object
An expression that evaluates to an object in the Applies To list.StatusInfo
A long integer that specifies a status information type as described in Settings.value
A long integer that specifies a number of seconds.
Data Type
Long
Modifiable
Read/write
Prototype (C/C++)
HRESULT GetStatusInfoRefetchInterval(SQLDMO_STATUSINFO_TYPE StatusInfoType,LPLONG pRefetchSeconds);
HRESULT SetStatusInfoRefetchInterval(SQLDMO_STATUSINFO_TYPE StatusInfoType,long RefetchSeconds);
Settings
Constant |
Value |
Description |
---|---|---|
SQLDMOStatInfo_All |
7 |
Used when setting StatusInfoRefetchInterval only. Sets all values equal to each other. |
SQLDMOStatInfo_/AutoVerifyConnection |
4 |
An interval for testing a broken connection. |
SQLDMOStatInfo_DatabaseSpace |
2 |
An interval for retrieving space available in databases referenced by Database objects active in the application. |
SQLDMOStatInfo_DatabaseStatus |
1 |
An interval for retrieving database status information, visible in the Status property, of active Database objects in the application. |
SQLDMOStatInfo_Unknown |
0 |
The value is not valid. |
주의
When an application connects a SQLServer object to an instance of Microsoft SQL Server, SQL-DMO automates the retrieval of some status information that allows application action based on changes in status for some SQL Server components.
By default, periodic update of status information is performed every 30 seconds.
Set a status interval value to 0 to stop periodic status information update. The following example illustrates creating a SQLServer object, configuring status information periodic update by disabling all updating, and then enabling only a test for broken connection.
' Create the SQLServer object.
Dim oSQLServer as New SQLDMO.SQLServer
' Disable all periodic updating.
oSQLServer.StatusInfoRefetchInterval(SQLDMOStatInfo_All) = 0
' Enable broken connection detection, setting to test every five seconds.
oSQLServer.StatusInfoRefetchInterval( _
SQLDMOStatInfo_AutoVerifyConnection) = 5