Eliminando un target del Repositorio del Grid Control
Al tratar de eliminar un target del monitoreo de Grid Control para poder agrergarlo nuevamente, me arrojo el siguiente error:
PRO.danalinux.com: - Connection failure may be due to a slow network, or to the presence of an intervening firewall. Saving PRO.danalinux.com_PRO2 ...java.sql.SQLException: ORA-20600: The specified target is in the process of being deleted.(target name = PRO.danalinux.com)(target type = rac_database)(target guid = 5B7EF67A10D95539FD55842B846872AD) ORA-06512: at "SYSMAN.TARGETS_INSERT_TRIGGER", line 36 ORA-04088: error during execution of trigger 'SYSMAN.TARGETS_INSERT_TRIGGER' ORA-06512: at "SYSMAN.EM_TARGET", line 1936 ORA-06512: at "SYSMAN.MGMT_TARGET", line 2702 ORA-06512: at line 1 - ORA-20600: The specified target is in the process of being deleted.(target name = PRO.danalinux.com)(target type = rac_database)(target guid = 5B7EF67A10D95539FD55842B846872AD) ORA-06512: at "SYSMAN.TARGETS_INSERT_TRIGGER", line 36 ORA-04088: error during execution of trigger 'SYSMAN.TARGETS_INSERT_TRIGGER' ORA-06512: at "SYSMAN.EM_TARGET", line 1936 ORA-06512: at "SYSMAN.MGMT_TARGET", line 2702 ORA-06512: at line 1
Esto sucede por que el JOB de Grid COntrol que elimina un target, no término correctamente. Me arme un plan de ejecución que con los siguinetes pasos:
1) Crearmos una tabla temporaria donde haremos un respaldo de los trabajamos no concluidos y vamos a proceder a eliminar estos trabajos pendientes.
2) Nos logueamos al host donde se encuentra el repositorio de EM, en nuestro caso es el mon01lx. 3) Cargamos las variables de ambiente.
[oracle@mon01lx ~]$ cd bin/ [oracle@mon01lx bin]$ . ./oem.sh
4) Nos logueamos como sysdba y nos convertimos en sysman.
[oracle@mon01lx bin]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.4.0 - Production on Mon Feb 16 11:22:26 2009 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bit Production With the Partitioning, OLAP and Data Mining options SQL> conn sysman Enter password: Connected. SQL>
5) Creamos la tabla donde almacenaremos los resultados temporales.
SQL>create table backup_mgmt_targets_delete as select * from mgmt_targets_delete;
6) Consultamos la tabla temporal para ver nuestro JOB inconcluso.
SQL> col TARGET_NAME format a35 SQL> col TARGET_TYPE format a20 SQL> col TARGET_GUID format a35 SQL> col EMD_URL format a50 SQL> col TIMEZONE_REGION format a10 SQL> set line 150 SQL> select * from backup_mgmt_targets_delete; TARGET_NAME TARGET_TYPE TARGET_GUID EMD_URL ----------------------------------- -------------------- ----------------------------------- -------------------------------------------------- TIMEZONE_R DELETE_RE DELETE_CO LAST_UPDA ---------- --------- --------- --------- PRO.danalinux.com rac_database 5B7EF67A10D95539FD55842B846872AD https://dat01lx.danalinux.com:3872/emd/ma in Etc/GMT+2 14-JAN-09 14-JAN-09 DAPRO.danalinux.com_DAPRO1 oracle_database 2D940522D7175100FCFB08CA7258B053 https://dat02lx.danalinux.com:3872/emd/ma 2 in Etc/GMT+2 10-FEB-09 10-FEB-09 05-FEB-09 APPS.danalinux.com_APPS1 oracle_database 3D2768C4B5F17824FB4428EB4C44B650 https://dat02lx.danalinux.com:3872/emd/ma PRO.danalinux.com_PRO oracle_database 833B9C78F1F72DA51307093ECE9DCE30 https://dat03lx.danalinux.com:3872/emd/ma 3 in Etc/GMT+2 10-FEB-09 10-FEB-09 10-FEB-09
7) Una vez identificado nuestro JOB inconcluso procedemos a eliminarlo.
SQL> exec mgmt_admin.delete_target('PRO.danalinux.com','rac_database');
* ) O utilizando el siguiente metascript
SQL> select 'exec mgmt_admin.delete_target('''||TARGET_NAME||''','''||TARGET_TYPE||''');' from backup_mgmt_targets_delete;
8 ) En el caso que no funcione podemos utilizar el siguiente.
SQL> exec mgmt_admin.delete_target_internal('PRO.danalinux.com','rac_database');
9) REALIZAMOS LA PRUEBA.
SQL> exec mgmt_admin.delete_target('PRO.danalinux.com','rac_database'); BEGIN mgmt_admin.delete_target('PRO.danalinux.com','rac_database'); END; * ERROR at line 1: ORA-20238: Target PRO.danalinux.com:rac_database is currently in the process of being deleted ORA-06512: at "SYSMAN.MGMT_ADMIN", line 436 ORA-06512: at "SYSMAN.MGMT_ADMIN", line 599 ORA-06512: at line 1 SQL> exec mgmt_admin.delete_target_internal('PRO.danalinux.com','rac_database'); PL/SQL procedure successfully completed.SQL>
Ahora registra el valor del timestamp corriente y asi puede eliminar la columna, dejándonos adherir nuevamente la instancia eliminada.
Una Nota de metalink que podemos tomar de referencia es el documento 376905.1
Excelente! Ni en ML se encuentra tan facil.
LikeLike
Thank you, you saved my life!
LikeLike