StatusInfoRefetchInterval Property

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

The StatusInfoRefetchInterval property controls the periodic, automatic update of status information maintained in SQL Distributed Management Objects (SQL-DMO) objects.


object
.StatusInfoRefetchInterval(StatusInfo) [= value]

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.

Read/write

HRESULT GetStatusInfoRefetchInterval(SQLDMO_STATUSINFO_TYPE StatusInfoType,LPLONG pRefetchSeconds);
HRESULT SetStatusInfoRefetchInterval(SQLDMO_STATUSINFO_TYPE StatusInfoType,long RefetchSeconds);

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

Community Additions

ADD
Show: