Tuesday, November 29, 2011

Installing an Enterprise Manager agent for a TimesTen database

This is a small howto about installing an Enterprise Manager 11g agent for a TimesTen 11 database; this howto assumes that you have already downloaded the agent in the client machine and configured the Management Plug-in for Oracle TimesTen In-Memory Database in your Enterprise Manager server.

First, you have to configure a response file to do a silent installation; an installation with OUI should be easy enough to not have to cover it here. In the response directory below your agent staging directory you should find an additional_agent.rsp file, copy it and change at least this fields:

timesten@myserver $ diff additional_agent.rsp my.rsp
> OMS_HOST=myoemserver
> OMS_PORT=4889

Next, launch runInstaller with the full path of your response file:

timesten@myserver $ cd /myagent/linux_x64/agent
timesten@myserver $ ./runInstaller -silent -responseFile /myagent/linux_x64/response/my.rsp

This way you will install an agent in /myagent directory; don't forget to run as root the root.sh configuration script after finishing runInstaller:

root@myserver # /myagent/agent11g/root.sh

If you want to check if the agent is running and communicating with the Grid Control server, run emctl and pay attention to the Last successful upload message:

timesten@myserver $ cd /myagent/agent11g/bin/
timesten@myserver $ ./emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Agent Version :
OMS Version :
Protocol Version :
Agent Home : /myagent/agent11g
Agent binaries : /myagent/agent11g
Agent Process ID : 5493
Parent Process ID : 14892
Agent URL : http://myserver:3872/emd/main/
Repository URL : http://myoemserver:4889/em/upload/
Started at : 2011-11-29 09:48:12
Started by user : timesten
Last Reload : 2011-11-29 11:50:40
Last successful upload : 2011-11-29 12:53:25
Total Megabytes of XML files uploaded so far : 13.84
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0.00
Available disk space on upload filesystem : 66.57%
Last successful heartbeat to OMS : 2011-11-29 12:53:29
Agent is Running and Ready

If you need to change the configuration of the agent for some reason then stop the agent, edit the emd.properties and targets.xml files, and optionally delete previous files:

timesten@myserver $ cd /myagent/agent11g/bin
timesten@myserver $ ./emctl stop agent
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.
timesten@myserver $ cd ..
timesten@myserver $ vi sysman/config/emd.properties
timesten@myserver $ vi sysman/emd/targets.xml
timesten@myserver $ cd sysman/emd
timesten@myserver $ rm -rf recv/* protocol.ini lastupld.xml collection/* state/* cputrack/* agntstmp.txt upload/* ../log/* emagent_storage.config core* sqlnet.log *sql
timesten@myserver $ cd /myagent/agent11g/bin
timesten@myserver $ ./emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Starting agent ..... started.

After these steps you have to be able to see the host and its agent in Grid Control at Targets tab, All Targets option. But in order to add a new TimesTen database to Enterprise Manager you have to first set the agent's password at Preferences -> Preferred Credentials -> Agent's Set Credentials icon; in that page you have to find your new agent and fill in the Host Username and Host Password fields. Next you will go to the Setup -> Management Plug-ins page and click the deploy icon of TimesTen management plug-in, in the next page add the new agent and click the Next button, and finally the Finish button in the last page.

Now you'll be able to add the TimesTen database clicking in the agent link in Targets page; it might be a delay to appear the TimesTen In Memory Database 11g option in the Add drop-down menu so take this into account. In that page you have to select the TimesTen In Memory Database 11g option from the Add menu, and then fill in the TimesTen instance name, Data Source Name, TimesTen user name and TimesTen password fields. Finally, click the Test Connection button and the OK button to complete the operation.

And if you're new to TimesTen and have no idea what the instance name and data source name would be, but the TimesTen user has the TT_HOME environment variable set, there is only one database at the server, and you know the username and password's database, you could guess TimesTen instance name and data source name this way:

timesten@myserver $ basename $TT_HOME
timesten@myserver $ ttstatus | grep Data
Data store /TimesTen/DataStore/MyDataStore/MyDataStore

More information:

Meeting Hardware Requirements
Meeting Package, Kernel Parameter, and Library Requirements

No comments:

Post a Comment