Search This Blog

Showing posts with label ORACLE DBA. Show all posts
Showing posts with label ORACLE DBA. Show all posts

Change DBCONTROL_UPLOAD_HOST using emca

$ emca -displayConfig dbcontrol -cluster

STARTED EMCA at Jul 15, 2017 3:07:12 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database unique name: orcl
Service name: orcl1
Do you wish to continue? [yes(Y)/no(N)]: y
Jul 15, 2017 3:07:25 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /d01/app/oracle/cfgtoollogs/emca/orcl/e                                                                                        mca_2017_07_15_15_07_11.log.
Jul 15, 2017 3:07:30 PM oracle.sysman.emcp.DatabaseChecks getGlobalDbUniqueName
WARNING: null
Jul 15, 2017 3:07:30 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMes                                                                                        sage
INFO:
****************  Current Configuration  ****************
 INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------

orcl             rac02             rac02.db.com
orcl             rac03             rac02.db.com  <<<<===========need to change)


Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 15, 2017 3:07:30 PM

$ emca -reconfig dbcontrol -cluster -EM_NODE rac03 -EM_NODE_LIST rac03            // eneter HOSTNAME


STARTED EMCA at Jul 15, 2017 3:29:43 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database unique name: orcl
Service name: orcl1
Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 15, 2017 3:29:59 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /d01/app/oracle/cfgtoollogs/emca/orcl/emca_2017_07_15_15_29_43.log.
Jul 15, 2017 3:30:03 PM oracle.sysman.emcp.DatabaseChecks getGlobalDbUniqueName
WARNING: null
Jul 15, 2017 3:30:03 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jul 15, 2017 3:30:07 PM oracle.sysman.emcp.EMAgentConfig performDbcReconfiguration
INFO: Propagating /d01/app/oracle/product/11.2.0/dbhome/rac03_orcl/sysman/config/emd.properties to remote nodes ...
Jul 15, 2017 3:30:08 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 15, 2017 3:30:26 PM oracle.sysman.emcp.EMDBPostConfig performDbcReconfiguration
INFO: Database Control started successfully
Jul 15, 2017 3:30:26 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
****************  Current Configuration  ****************
 INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------

orcl             rac02             rac02.db.com
orcl             rac03             rac03.db.com <<<<============Changed)


Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 15, 2017 3:30:26 PM
$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
https://rac02.db.com:5501/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ...... started.
------------------------------------------------------------------
Logs are generated in directory /d01/app/oracle/product/11.2.0/dbhome/rac02_orcl/sysman/log

emctl upload agent failed

$ export ORACLE_SID=orcl2
$ export ORACLE_UNQNAME=orcl
$ emctl upload agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload error: Failed to upload file A0000243.xml: HTTP error.
Response received: ERROR-400|ORA-28239: no key provided
ORA-06512: at "SYS.DBMS_CRYPTO_FFI", line 3
ORA-06512: at "SYS.DBMS_CRYPTO", line 13
ORA-06512: at "SYSMAN.ENCRYPT", line 9
ORA-06512: at "SYSMAN.MGMT_CREDS_INS_UPD", line 7
ORA-04088: error during execution of trigger 'SYSMAN.MGMT_CREDS_INS_UPD'

$ emctl status agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.4.5
OMS Version       : 10.2.0.4.5
Protocol Version  : 10.2.0.4.5
Agent Home        : /d01/app/oracle/product/11.2.0/dbhome/rac02_orcl
Agent binaries    : /d01/app/oracle/product/11.2.0/dbhome
Agent Process ID  : 11993508
Parent Process ID : 14745618
Agent URL         : https://rac02.prod.com:1830/emd/main
Repository URL    : https://rac02.prod.com:5500/em/upload/
Started at        : 2017-06-20 13:01:39
Started by user   : oracle
Last Reload       : 2017-07-08 00:57:12
Last successful upload                       : 2017-07-07 09:31:27
Total Megabytes of XML files uploaded so far :   513.19
Number of XML files pending upload           :      924
Size of XML files pending upload(MB)         :    20.07
Available disk space on upload filesystem    :    52.68%
Data channel upload directory                : /d01/app/oracle/product/11.2.0/dbhome/rac02_orcl/sysman/recv
Collection Status                            : Disabled by Upload Manager <<<<===Upload Failed=====
Last successful heartbeat to OMS             : 2017-07-14 10:21:31
---------------------------------------------------------------
Agent is Running and Ready



Solution:
========
$ emctl stop dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
https://rac02.prod.com:5500/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control ...
 ...  Stopped.

Then go to the sysman/emd folder
> Delete or compress or move lastupld.xml file
Then go to the sysman/emd/upload folder
> Delete or compress or move all the file inside sysman/emd/upload folder

$ cd /d01/app/oracle/product/11.2.0/dbhome/rac02_orcl/sysman/emd
$ compress lastupld.xml
$ cd /d01/app/oracle/product/11.2.0/dbhome/rac02_orcl/sysman/emd/upload
$ rm *

$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
https://rac02.prod.com:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ...... started.
------------------------------------------------------------------
Logs are generated in directory /d01/app/oracle/product/11.2.0/dbhome/rac02_orcl/sysman/log
$ emctl upload agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully
$ emctl status agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.4.5
OMS Version       : 10.2.0.4.5
Protocol Version  : 10.2.0.4.5
Agent Home        : /d01/app/oracle/product/11.2.0/dbhome/rac02_orcl
Agent binaries    : /d01/app/oracle/product/11.2.0/dbhome
Agent Process ID  : 9961834
Parent Process ID : 11402312
Agent URL         : https://rac02.prod.com:1830/emd/main
Repository URL    : https://rac02.prod.com:5500/em/upload/
Started at        : 2017-07-14 10:33:29
Started by user   : oracle
Last Reload       : 2017-07-14 10:33:29
Last successful upload                       : 2017-07-14 10:34:28
Total Megabytes of XML files uploaded so far :    15.29
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    81.33%
Data channel upload directory                : /d01/app/oracle/product/11.2.0/dbhome/rac02_orcl/sysman/recv <<<<<<< It's Working Now
Last successful heartbeat to OMS             : 2017-07-14 10:34:45
---------------------------------------------------------------
Agent is Running and Ready




Launch your Online Business with a $5.99 .COM!