The Oracle Trace daemon must be set up correctly in order to communicate with the Oracle Trace console. Correct setup of the Oracle Trace daemon requires that the Oracle Trace executables be in place and that the Oracle Trace listener be running. The executables are copied to the server during the Oracle7 server setup process. The listener for the Oracle Trace daemon is set up by modifying listener.ora.
If SQL*Net version 2.3 has been configured with the SQL*Net configuration tool, Network Manager 3.1, all the necessary files have been automatically configured for your system. For your information, the configurations of the tnsnames.ora and listener.ora are discussed in the following sections.
Note: Oracle Trace requires that the Oracle Server release 7.3.2 be installed.
The following is an example of how the topology.ora file must look (rama is the node name, ramaagent is the oem_agent, ramatrace is the trace_daemon):
ramaagent = (oracle_agent, rama)
ramatrace = (oracle_trace, rama)
The trace_daemon name (ramatrace in this example) must map to the entry in tnsnames.ora that points to the Oracle Trace daemon listener on the Server node.
The following is an example of a Oracle Trace entry in the tnsnames.ora file:
ramatrace = (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=rama) (PORT=3333)) (CONNECT_DATA=(SID=otrace_dsid)))
The PORT and SID (in this example, 3333 and otrace_dsid) must match the PORT and SID in the Server listener.ora file. The service name (ramatrace) must match the service name in the topology.ora file.
The following is an example of what must be in the listener.ora file under $ORACLE_HOME/network/admin on the Server:
LISTOTRC = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp) (HOST = Rama) (PORT = 3333) ) ) STARTUP_WAIT_TIME_LISTOTRC = 0 CONNECT_TIMEOUT_LISTOTRC = 10 SID_LIST_LISTOTRC = (SID_LIST = (SID_DESC= (SID_NAME = otrace_dsid) (PROGRAM = otrcsvr) (ORACLE_HOME = directory_for_oracle_home ) ) )
The SID_NAME and the PORT must match the SID_NAME and PORT in the tnsnames.ora file on the Client machine.
Once you have edited the listener.ora file, you need to start the new listener. To do this, run the lsnrctl image using the start command:
% lsnrctl start listotrc
Specifically, there is an SQL file run during Server installation that creates the needed stored procedures and a tracesvr account (password trace). This is the account that the console uses when it starts a Server collection, but the account is not created with the correct privileges. This results in failure whenever the tracesvr account attempts to do a select from the v$session table.
You can determine if this is the case by:
select * from v$session;
If this fails, you need to grant DBA access to the tracesvr account. To do this:
grant dba to tracesvr;
You should now be able to do the select from the V$SESSION table.
Note: The previous steps need to be taken on every database for which you want to start collections.
Oracle Trace obtains the database names from Enterprise Manager, but connects to the database on the Server. This means that for any database identified in the Client topology.ora file for which you want to start a collection, there must be an identical entry in both the Client tnsnames.ora file and the Server tnsnames.ora file.
For additional information about Oracle Trace post-installation considerations, refer to the README file included on your media.