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