Skip to main content
Previous section

Quick Reference for the .NET Managed Provider

This chapter is a quick reference for the following extended classes and options:

Class IRISPoolManager

The IRISClient.IRISPoolManager class can be used to monitor and control connection pooling programmatically. The following static methods are available:

ActiveConnectionCount()
int count = IRISPoolManager.ActiveConnectionCount();
Copy code to clipboard

Total number of established connections in all pools. Count includes both idle and in-use connections.

IdleCount()
   int count = IRISPoolManager.IdleCount();
Copy code to clipboard

Total number of idle connections in all the pools.

   int count = IRISPoolManager.IdleCount(conn);
Copy code to clipboard

Total number of idle connections in the pool associated with connection object conn.

InUseCount()
   int count = IRISPoolManager.InUseCount();
Copy code to clipboard

Total number of in-use connections in all pools.

   int count = IRISPoolManager.InUseCount(conn);
Copy code to clipboard

Total number of in-use connections in the pool associated with connection object conn.

RecycleAllConnections()
   IRISPoolManager.RecycleAllConnections(bool remove);
Copy code to clipboard

Recycles connections in all pools

   IRISPoolManager.RecycleConnections(conn,bool remove)
Copy code to clipboard

Recycles connections in the pool associated with connection object conn.

RemoveAllIdleConnections()
   IRISPoolManager.RemoveAllIdleConnections();
Copy code to clipboard

Removes idle connections from all connection pools.

RemoveAllPoolConnections()
   IRISPoolManager.RemoveAllPoolConnections();
Copy code to clipboard

Deletes all connections and removes all pools, regardless of what state the connections are in.

Class IRISConnection

ClearPool()
   IRISConnection.ClearPool(conn);
Copy code to clipboard

Clears the connection pool associated with connection conn.

ClearAllPools()
   IRISConnection.ClearAllPools();
Copy code to clipboard

Removes all connections in the connection pools and clears the pools.

Connection Parameter Options

The following tables describe all parameters that can be used in a connection string.

Required Parameters

The following parameters are required for all connection strings (see “Creating a Connection”).

server

alternate names: ADDR, ADDRESS, DATA SOURCE, DATASOURCE, HOST, NETWORK ADDRESS, NETWORKADDRESS

IP address or host name. For example: Server = localhost

port

Specifies the TCP/IP port number for the connection. For example: Port = 1972

namespace

alternate names: DATABASE, INITIAL CATALOG

Specifies the namespace to connect to. For example: Namespace = USER

password

alternate name: PWD

User's password. For example: Password = SYS

user id

alternate names: USERID, UID, USER, USERNAME, USR

Set user login name. For example: User ID = _SYSTEM

Connection Pooling Parameters

The following parameters define various aspects of connection pooling (see “Connection Pooling”).

connection lifetime

alternate name: CONNECTIONLIFETIME

The length of time in seconds to wait before resetting an idle Pooled connection when the connection reset mechanism is on. Default is 0.

connection reset

alternate name: CONNECTIONRESET

Turn on Pooled connection reset mechanism (used with CONNECTION LIFETIME). Default is false.

max pool size

alternate name: MAXPOOLSIZE

Maximum size of connection pool for this specific connection string. Default is 100.

min pool size

alternate name: MINPOOLSIZE

Minimum or initial size of the connection pool, for this specific connection string. Default is 0.

pooling

Turn on connection pooling. Default is true.

Other Connection Parameters

The following optional parameters can be set if required.

application name

Sets the application name.

connection timeout

alternate name: CONNECT TIMEOUT

Sets the length of time in seconds to try and establish a connection before failure. Default is 30.

current language

Sets the language for this process.

logfile

Turns on logging and sets the log file location.

packet size

Sets the TCP Packet size. Default is 1024.

PREPARSE CACHE SIZE

Sets an upper limit to the number of SQL commands that will be held in the preparse cache before recycling is applied. Default is 200.

sharedmemory

Enables or disables shared memory connections on localhost or 127.0.0.1. For example: SharedMemory=false disables shared memory. Default is true.

so rcvbuf

Sets the TCP receive buffer size. Default is 0 (use system default value).

so sndbuf

Sets the TCP send buffer size. Default is 0 (use system default value).

ssl

Specifies whether SSL/TLS secures the client-server connection (see “Configuring .NET Clients to Use SSL/TLS with InterSystems IRIS” in the Security Administration Guide). Default is false.

tcp nodelay

Sets the TCP nodelay option. Default is true.

transaction isolation level

Sets the System.Data.IsolationLevel value for the connection.

workstation id

Sets the Workstation name for process identification.