Skip Headers

Oracle® Objects for OLE Developer's Guide

Part Number B10952-01
Go To Table Of Contents

OraServer Object

See Also


OraServer represents a physical network connection to an Oracle database server.


The OraServer interface is introduced to expose the connection multiplexing feature provided in the Oracle Call Interface. After an OraServer object is created, multiple user sessions (
OraDatabase) can be attached to it by invoking the OpenDatabase method. This feature is particularly useful for application components, such as Internet Information Server (IIS), that use Oracle Objects for OLE in an n-tier distributed environments. The use of connection multiplexing when accessing Oracle severs with a large number of user sessions active can help reduce server processing and resource requirements while improving the server scalability.

As illustrated in the following figure, the OraServer interface contains a connection to an Oracle server and provides a method (OpenDatabase) for creating user sessions (OraDatabases) on the server connection it contains.

Text description of the illustration o4o00015.gif follows

Text description of the illustration o4o00015.gif

In the following Visual Basic example, two user sessions (hrDBSession1, hrDBSession2) are established on the server whose network alias is

'Main thread of execution. Create a server connection

Set hrDBServer = CreateObject("OracleInProcServer.XOraServer")

Set hrDBSession1 = hrDBServer.OpenDatabase("scott/tiger",0)

'execute queries ...

Set hrDBSession2= hrDBServer.OpenDatabase("scott/tiger", 0)

'execute queries ...

This interface can also be created independently through the COM method, CreateObject in VBA, or CoCreateInstance in C/C++. In this case, the connection to the server must be established explicitly by invoking the Open method.

Set strprdServer = CreateObject(OracleInProcServer.XOraServer)


Copyright © 1994, 2003 Oracle Corporation.

All Rights Reserved.
Go To Table Of Contents