Вы находитесь на странице: 1из 3

Add ASM instance as a target to Enterprise Manager:

Now we need to add this newly created ASM instance as a target to the Enterprise Manager agent.
/* Create an xml file with any name at any location. What I usually do is create a file named asmTarget.xml at the location "$ORACLE_HOME/ora10.home.com_ora10g/sysman/emd/" , which is the location for target.xml where all EM targets are configured. ora10.home.com is my host name and ora10g is the sid for my Oracle RDBMS instance. You should have a similar directory in your machine with a name of your host and your oracle SID. */ $ cd $ORACLE_HOME/ora10.home.com_ora10g/sysman/emd/ $ ll total 28 -rw-r----- 1 oracle oinstall 56 May 12 09:16 agntstmp.txt drwxr----- 2 oracle oinstall 4096 Apr 29 07:01 collection -rw-r----- 1 oracle oinstall 3809 May 12 09:14 lastupld.xml -rw-r----- 1 oracle oinstall 80 May 12 08:53 protocol.ini drwxr----- 2 oracle oinstall 4096 May 12 09:16 state -rw-r----- 1 oracle oinstall 950 May 12 08:54 targets.xml drwxr----- 2 oracle oinstall 4096 May 12 09:16 upload /* create new file asmTarget.xml and put the following text into it. */ <Target TYPE="osm_instance" NAME="+ASM_ora10.home.com"> <Property NAME="SID" VALUE="+ASM" /> <Property NAME="MachineName" VALUE="ora10.home.com" /> <Property NAME="OracleHome" VALUE="/u01/app/oracle/product/10.2.0/db_1" /> <Property NAME="UserName" VALUE="sys" /> <Property NAME="password" VALUE="system" ENCRYPTED="FALSE"/> <Property NAME="Role" VALUE="sysdba" /> <Property NAME="Port" VALUE="1521" /> </Target> /* SID is the sid for your ASM instance. MachineName is the hostname where ASM instance is running. OracleHome is the ASM instance home. UserName is the user who can connect with ASM instance. Password is the password of the user. Role is the administrative level. Port is the port where Oracle Listener is listening for the ASM instance. */

Now run the following command to add this new target to EM targets.
$ emctl config agent addtarget \ > $ORACLE_HOME/ora10.home.com_ora10g/sysman/emd/asmTarget.xml TZ set to US/Eastern

Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.

After the command is executed successfully, you should see these lines in the target.xml file where all EM targets are configured. Notice the encrypted password. This was done during the "emctl config agent addtarget" command.
$ tail -10 targets.xml <Target TYPE="osm_instance" NAME="+ASM_ora10.home.com"> <Property NAME="SID" VALUE="+ASM"/> <Property NAME="MachineName" VALUE="ora10.home.com"/> <Property NAME="OracleHome" VALUE="/u01/app/oracle/product/10.2.0/db_1"/> <Property NAME="UserName" VALUE="sys"/> <Property NAME="password" VALUE="499f8610be848dc6" ENCRYPTED="TRUE"/> <Property NAME="Role" VALUE="sysdba"/> <Property NAME="Port" VALUE="1521"/> </Target> </Targets>

Now restart the dbconsole.


$ emctl stop dbconsole TZ set to US/Eastern Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://ora10.home.com:1158/em/console/aboutApplication Stopping Oracle Enterprise Manager 10g Database Control ... ... Stopped. $ emctl start dbconsole TZ set to US/Eastern Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://ora10.home.com:1158/em/console/aboutApplication Starting Oracle Enterprise Manager 10g Database Control ........................... started. -----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/10.2.0 /db_1/ora10.home.com_ora10g/sysman/log

After the dbconsole is restarted open enterprise manager and now you should see your ASM instance link in the "General" section of your EM home page.

Click on the ASM instance link and you should be transfered to the ASM instance home page.

Вам также может понравиться