Configure and Manage the Oracle Network
There haven't been too many times when I have used the tools provided by Oracle to manage net services. Mostly, I take an existing file and change it to suit my current needs. The biggest reason for this is probably because I never quite understood what exactly was being asked for.
The 3 files typically involved are sqlnet.ora, listener.ora and tnsnames.ora which can be found in the <ORACLE_HOME>/network/admin folder.
Typically, these files are created by Oracle on installation. Perusing the files that are on my 11.2 installation, they appear to be the default (and I don't believe I have ever had need to modify them).
Here's the default entry for sqlnet.ora
I've seen NAMES.DIRECTORY_PATH before, but it appears that ADR_BASE is new to 11g. I'll have to read up a bit on that one and get back to you. To read up on the different parameters for the sqlnet.ora file, go here.
# sqlnet.ora Network Configuration File:
# /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
ADR_BASE = /u01/app/oracle
As far as the tnsnames.ora goes, I don't believe it is required to be configured on the database server itself. This is mainly a client configuration file. Here is what it looks like on my server:
And here is the entry on my host machine:
TESTING =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracledb)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testing)
)
)
Note the one difference between the two, the HOST. The HOST tells you (or your client tool really) on which server this database resides. If this were a RAC instance, you would see multiple ADDRESS sections. That is beyond the scope of this test however.
TESTING =
( DESCRIPTION =
( ADDRESS = ( PROTOCOL = TCP )( HOST = 192.168.1.5 )( PORT = 1521 ) )
( CONNECT_DATA =
( SERVER = DEDICATED )
( SERVICE_NAME = testing )
)
)
To read more about the parameters for a tnsnames.ora file, go here.
Finally you have your listener.ora file. This file is absolutely necessary on your database server. The Oracle Net Listener is a separate process that runs on the database server. It receives incoming client connection requests and manages the traffic of these requests to the database server.
Here's what the default listener.ora file looks like on my installation:
Again, the ADR_BASE_LISTENER is new to 11g and requires further research.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = oracledb)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
Using the Oracle Shared Server architecture
Documentation
In a shared server configuration, client user processes connect to a dispatcher. The dispatcher can support multiple client connections concurrently. Each client connection is bound to a virtual circuit, which is a piece of shared memory used by the dispatcher for client database connection requests and replies. The dispatcher places a virtual circuit on a common queue when a request arrives.
An idle shared server process picks up the virtual circuit from the common queue, services the request, and relinquishes the virtual circuit before attempting to retrieve another virtual circuit from the common queue. This approach enables a small pool of server processes to serve a large number of clients. A significant advantage of shared server architecture over the dedicated server model is the reduction of system resources, enabling the support of an increased number of users.
For even better resource management, shared server can be configured for connection pooling. Connection pooling lets a dispatcher support more users by enabling the database server to time-out protocal connections and to use those connections to service an active session. Further, shared server can be configured for session multiplexing, which combines multiple sessions for transmission over a single network connection in order to conserve the operating system's resources.
Shared server architecture requires Oracle Net Services. User processes targeting the shared server must connect through Oracle Net Services, even if they are on the same machine as the Oracle Database instance.
No comments:
Post a Comment