[TOC] [Prev] [Next] [Bottom]



<@DATASOURCESTATUS>

Syntax

<@DATASOURCESTATUS [DSN=datasourcename] [TYPE=ODBC|DAM|FileMaker|Oracle|DLL|CommandLine|Java|
AppleEvent|Mail] [ENCODING=encoding] [{array attributes}]>

Description

The <@DATASOURCESTATUS> meta tag returns a two-dimensional array containing summary information about data sources used by Tango Server. The meta tag returns one row for each data source currently in use and for data sources used previously but whose connections have expired or have been closed. Tango Server considers External action connections and Mail action connections to be data sources, so information on these actions is also returned.

The optional DSN attribute is used to restrict the information returned to that from data sources, External actions, or Mail actions with the specified name. If omitted, information for all data sources, External actions, or Mail actions is returned. If an invalid name is specified, an error is returned.

The optional TYPE attribute is used to restrict the information returned to data sources, External actions, or Mail actions of the specified type. The type must be one of the listed values (ODBC, DAM, FileMaker, or Oracle, if data sources; DLL, CommandLine, Java, AppleEvent, or Mail, if referring to actions). If omitted, information for all data source types, External action types, and Mail actions is returned. If an invalid type is specified, an error is returned.

There are array-returning attributes that can be used to specify prefixes and suffixes for the returned array, rows within the array, and columns within the rows. They are described in the section Array-to-Text Conversion Attributes. By default, the returned array is formatted as an HTML table.

For more information on External actions and Mail actions, see Chapter 15 and Chapter 16 of the User's Guide.

Mail and External actions are treated as data sources by Tango Server. Specifying DLL (DLL-type External action), CommandLine (command-line External action), Java (Java External action), AppleEvent (AppleEvent External action), or Mail (Mail action) in the TYPE attribute returns information on these actions.

(The <@CONNECTIONS> meta tag differs from the <@DATASOURCESTATUS> meta tag in that it returns one row containing information about each data source connection currently in use by Tango Server.)


! Note: This tag is limited to returning information about the data source types listed above. Information about other data sources used by Tango Server (such as those accessed through external actions) are not returned by this meta tag.


The <@DATASOURCESTATUS> meta tag returns a two-dimensional array containing the following columns:

Category

Description

Version

Version of <@DATASOURCESTATUS> information. Returns "1" for the initial version of this meta tag.

Name

For database data sources, the name of the data source; for others, the name of the resource connecting to (for example, Mail server or External action.

Type

Data source type (ODBC | DAM | FileMaker | Oracle | CommandLine | Java | AppleEvent | Mail).

Info

Additional information about the connection (for example, ODBC driver name and version). The information returned depends on the data source driver. Empty for External and Mail actions.

ThreadSafe

Returns "1" if driver is single-threaded (as specified using the dsconfig configuration variable) or "0" if driver is thread safe.

UserName

User name (after tag substitution) used to connect to the data source. Blank if no user name was specified.

MaxConnections

Maximum number of connections allowed for this data source, as specified using the dsconfig configuration variable. If dsconfig is not being used to limit this data source, then "0" (unlimited) is returned.

NumConnections

Number of connections currently open to this data source.

NumExpiredConnections

Number of connections previously opened to this data source, but closed or expired.

MinutesIdle

Number of minutes since a query was last executed by the connection.

NumQryExecuted

Number of queries executed by the data source.

MaxQryProcessTime

Maximum time (in milliseconds, accurate to 1/60th of a second) required to process a query. Does not include time to fetch or process results.

AvgQryProcessTime

Average time (in milliseconds, accurate to 1/60th of a second) required to process a query. Does not include time to fetch or process results.

MaxRowSetSize

Maximum number of rows returned by a single query processed by the connection.

AvgRowSetSize

Average number of rows returned by a single query processed by the connection.

ErrorsGenerated

Number of errors generated during execution.


! Note: Row 0 of the array returned by <@DATASOURCESTATUS> contains the column titles listed in the Category column of the above table. You can return the category names by using the following meta tags:

<@ASSIGN local$tempArray value=<@DATASOURCESTATUS>>

<@VAR local$tempArray[0,*]>

<@VAR local$tempArray>


Example

<@DATASOURCESTATUS>

Returns a two-dimensional array listing all data source categories for all data sources.

<@DATASOURCESTATUS TYPE=ODBC>

Returns a two-column array listing information for only ODBC data sources.

See Also

Array-to-Text Conversion Attributes
<@CONNECTIONS>
Encoding Attribute



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1999, Pervasive Software. All rights reserved.