Unregister Database RMAN

Executez la requete suivante pour avoir le DBID :

select dbid,name from v$database;

      DBID NAME
---------- ---------
1553258961 ORCL

connectez a la base de donnée rman avec le user owner bakcup de ma base de donnée ORCL (RMAN_ORCL):

select db_key,dbid,name from rman_ORCL.rc_database  where dbid ='1553258961'

350 1553258961  ORCL

lancez le script suivant pour unregister database :

dbms_rcvcat.unregisterdatabase(db_key,db_id);

dans notre cas :

exec dbms_rcvcat.unregisterdatabase(350,1553258961);

PL/SQL procedure successfully completed.

Erreur Agent GC 11g de type (ERROR = AGENT_TZ_MISMATCH)

Erreur de type dans OMS Alerte :

datetime="2012-09-09T10:42:11+00:00">datetime="2012-09-09T10:42:11+00:00">2012-09-09 09:56:14,400 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR receiver.AbstractOMSHandshake logp.251 - OMSHandshake failed.(AGENT URL = https://hostname.domainame:3872/emd/main/)(ERROR = AGENT_TZ_MISMATCH)

Si on essai de démarrer le service sur le nœud dans notre exemple (hostname):

[oracle@hostname]/EMAgent/oracle/agent11g/bin # ./emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Starting agent ....... failed.
Consult the log files in: /EMAgent/oracle/agent11g/sysman/log

Dans ce cas la faut réinitialiser Time Zome comme suit :

[oracle@hostname]/EMAgent/oracle/agent11g/bin # ./emctl resetTZ agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Updating /EMAgent/oracle/agent11g/sysman/config/emd.properties...
Successfully updated /EMAgent/oracle/agent11g/sysman/config/emd.properties.
Login as the em repository user and run the  script:
exec mgmt_target.set_agent_tzrgn('hostname.domainame:3872:3872','+01:00')
and commit the changes
This can be done for example by logging into sqlplus and doing
SQL> exec mgmt_target.set_agent_tzrgn('omu2.otalgerie.com:3872','+01:00')
SQL> commit
[oracle@hostname]/EMAgent/oracle/agent11g/bin #

Exécutez la commande donner par le service emctl sur OMS :

oracle@omshost:/home/oracle#sqlplus
/as
SQL*Plus: Release 11.2.0.1.0 Production on Sun Sep 9 10:06:43 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name:  sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exec mgmt_target.set_agent_tzrgn('hostname.domainame:3872','+01:00');

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
oracle@omshost:/home/oracle#

Packaging Critical errors a partir des alertes Oracle

Grace a l’interface en ligne de commande adrci on peut manuellement récolter les erreurs critiques a partir d’une alerte et compresser le ficher dans un chemin bien précis.

– Accéder a l’interfcae adrci :

oracle@hostname:/home/oracle#adrci
ADRCI: Release 11.2.0.3.0 - Production on Wed Aug 8 12:07:44 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
ADR base = "/oracle/appl"
adrci>


РAfficher les diff̩rents homes (ADR homes) chemin que Oracle g̩n̬re les alertes :

adrci> show home
ADR Homes:  
diag/asm/+asm/+ASM
diag/clients/user_oracle/host_3517654603_11
diag/clients/user_oracle/host_3517654603_80
diag/asmtool/user_oracle/host_3517654603_80
diag/tnslsnr/otafmsdb/date
diag/tnslsnr/otafmsdb/listener_nikira
diag/tnslsnr/otafmsdb/listener
diag/rdbms/DBNAME/DBNAME

РExporter ORACLE_HOME de la base de donn̩es pour visualiser les alertes :

adrci> set homepath diag/rdbms/DBNAME/DBNAME

РAfficher la liste des erreurs group̩es :

adrci> show problem
 
ADR Home = /oracle/appl/diag/rdbms/DBNAME/DBNAME:
*************************************************************************
PROBLEM_ID           PROBLEM_KEY                                                 LAST_INCIDENT        LASTINC_TIME                              
-------------------- ----------------------------------------------------------- -------------------- ----------------------------------------  
5                    ORA 445                                                     1872427              2012-03-12 06:08:46.986000 +01:00        
7                    ORA 600 [17112]                                             1896818              2012-03-13 04:45:40.056000 +01:00        
6                    ORA 7445 [kghfrmrg()+143]                                   1896819              2012-03-13 04:45:41.631000 +01:00        
3                    ORA 600 [kghfrmrg:nxt]                                      1901754              2012-03-13 04:45:57.921000 +01:00        
8                    ORA 600 [qcsfbdnp:1]                                        1992763              2012-04-19 13:02:35.505000 +01:00        
9                    ORA 600 [ORA-00600: internal error code, arguments: [kcblas 2000195              2012-04-30 10:02:20.308000 +01:00        
1                    ORA 4031                                                    2016478              2012-05-20 01:27:52.656000 +01:00        
4                    ORA 7445 [kglic0()+1075]                                    1992979              2012-06-24 05:00:31.797000 +01:00        
12                   ORA 600 [kglobf0-bad-cdp]                                   2040749              2012-07-09 17:25:35.704000 +01:00        
11                   ORA 7445 [kgldmp0()+20212]                                  2040750              2012-07-09 17:25:35.801000 +01:00        
13                   ORA 600 [kglhdda-bad-free]                                  2045109              2012-07-13 19:23:09.784000 +01:00        
10                   ORA 7445 [kglic0()+1124]                                    2046525              2012-07-13 23:07:04.587000 +01:00        
14                   ORA 4030                                                    2088904              2012-08-05 16:01:16.002000 +01:00        
15                   ORA 240                                                     2088877              2012-08-06 04:42:27.630000 +01:00        
2                    ORA 7445 [kglic0()+1086]                                    2118403              2012-08-07 05:00:37.989000 +01:00        
16                   ORA 600 [kcrpdv_noent]                                      2136955              2012-08-07 05:12:36.765000 +01:00        
17                   ORA 600 [ORA-00600: internal error code, arguments: [kcrpdv 2136859              2012-08-07 05:12:37.676000 +01:00        
17 rows fetched

РDans notre cas on prend un des plus r̩centes erreurs g̩n̩r̩es par la base :

adrci> show incident -p "problem_key='ORA 600 [kcrpdv_noent]'"
ADR Home = /oracle/appl/diag/rdbms/DBNAME/DBNAME:
*************************************************************************
INCIDENT_ID          PROBLEM_KEY                                                 CREATE_TIME                              
-------------------- ----------------------------------------------------------- ----------------------------------------  
2136955              ORA 600 [kcrpdv_noent]                                      2012-08-07 05:12:36.765000 +01:00        
1 rows fetched


– Regrouper tous les erreurs de type ORA 600 dans un fichier donner le chemin et le compresser automatiquement :

adrci> ips pack incident 2136955 in /tmp
Generated package 1 in file /tmp/ORA600kcr_20120808121018_COM_1.zip, mode complete

РLe fichier est pr̻t a exploiter dans le chemin sp̩cifier (/tmp):

-rw-r--r--  1 oracle dba    27179740 aoû  8 12:12 ORA600kcr_20120808121018_COM_1.zip

Merci.

Corruption du fichier OCR

Une des problème de crash CRS oracle 10g est la corruption du fichier OCR et dé-configuration du cluster, vous aurez des erreurs du type (dans notre cas le nœud 1 a été dé-configuré du cluster) :

[root@node1 ~]# crsctl enable crs
Failure at scls_scr_setval with code 8
Internal Error Information:
Category: 1234
Operation: scls_scr_search
Location: search
Other: id doesnt exist scls_scr_setval
Dep: 2
[root@node1 ~]# crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
[root@node1 ~]# crs_stat -t
CRS-0184: Cannot communicate with the CRS daemon.

dans ce cas la on a 2 solutions, restaure du fichier OCR a partir d’un backup, ou reconfiguration de l’OCR a nouveau avec la note “399482.1”.

dans notre cas on va restauré le fichier, on va commencer par identification des fichiers:

[oracle@node1 ~]$ ocrconfig -showbackup
 
node2     2012/03/07 14:38:54     /u01/app/oracle/product/10.2.0/crs/cdata/OTA
 
node2     2012/03/07 10:38:52     /u01/app/oracle/product/10.2.0/crs/cdata/OTA
 
node2     2012/03/07 06:38:49     /u01/app/oracle/product/10.2.0/crs/cdata/OTA
 
node2     2012/03/06 02:38:30     /u01/app/oracle/product/10.2.0/crs/cdata/OTA
 
node2     2012/02/23 02:35:37     /u01/app/oracle/product/10.2.0/crs/cdata/OTA

lancement du restaure avec la commande suivante:

[root@node1]# ocrconfig -restore backup00.ocr

après le restore le CRS démarre automatiquement, mais le nœud 1 reste toujours dé-configuré, la cause est le manque des fichier de configuration dans les chemins suivant:

/etc/oracle/*
/etc/init.d/init.cssd
/etc/init.d/init.crs
/etc/init.d/init.crsd
/etc/init.d/init.evmd
/etc/rc2.d/K96init.crs
/etc/rc2.d/S96init.crs
/etc/rc3.d/K96init.crs
/etc/rc3.d/S96init.crs
/etc/rc5.d/S96init.crs
/etc/inittab.crs
/etc/inittab

Copiez les fichiers a partir du nœuds 2 et allouez les mêmes permissions et le même owner.
Exécutez avec root init q , cette commande provoque un “reload” inittab.
Exécutez crsctl stop crs -f et crsctl start crs.

Erreur durant upgrade Agent oracle Grid Control de 10.2.0.4 vers 10.2.0.5

Durant upgrade Agent Grid Control de 10.2.0.4 vers 10.2.05 sous HP-UX, vous aurez ce genre d’erreur dans le logfile d’installation:

Error in invoking target 'agent emsubagent' of makefile 'ins_emagent.mk'

Avec erreur graphique du Dispaly:

Error Installation

Solution:

Note: It is a known bug and further information could be retreived from 837072.1

1) modifier les fichiers suivant:

cd $AGENT_HOME/sysman/lib  
vi env_emagent.mk  
vi ins_emagent.mk

2) effectuer les changements suivant ins_emagent.mk file:

– dans la line 29,:

# libnmevc \

vers:

# libnmevc

Enlever le slash, qui provoque “Syntax Error” durant le relink.

3) effectuer les changements suivants env_emagent.mk file:

– dans la ligne 2427, on trouve la ligne suivante:

NEW_LD_SHLIBS = $(EMAGENT_SHLIBS)

Rajouter les variables suivantes EMAGENT_SHLIBS comme suit:

NEW_LD_SHLIBS = $(EMAGENT_SHLIBS)  
 
EMAGENT_SHLIBS= $(LIBURLDATAFETCHLET_SHARED) \
$(LIBDMSFETCHLET_SHARED) \
$(LIBOSFETCHLET_SHARED) \
$(LIBTNMECR_SHARED) \
$(LIBSPFETCHLET_SHARED) \
$(LIBOCI_SHARED) \
$(LIBWBEMFETCHLET_SHARED) \
$(LIB_UT_FETCHLET_SHARED) \
$(LIBPORTFETCHLET_SHARED) \
$(LIBTESTFETCHLET_SHARED) \
$(LIBVERFETCHLET_SHARED) \
$(LIBPROPFROMASSOCFETCHLET_SHARED) \
$(LIBSQLFETCHLET_SHARED) \
$(LIBSQLTFETCHLET_SHARED) \
$(LIBTNMECLU_SHARED) \
$(LIBTNMEVR_SHARED) \
$(LIBNMEVQ_SHARED) \
$(LIBNMEVC_SHARED) \
$(LIBNMEVSP_SHARED) \
$(LIBNMS_SHARED) \
$(LIBNMS0_SHARED) \
$(LIBNMSP_SHARED) \
$(LIB_NMADBG_SHARED) \
$(LIB_NMADM_SHARED) \
$(LIB_NMALK_SHARED) \
$(LIB_NMARL_SHARED) \
$(LIB_NMASF_SHARED) \
$(LIB_NMASTK_SHARED) \
$(LIBNMEPS_SHARED) \
$(LIB_OJMX_FETCHLET_SHARED) \
$(LIBNMECLURAC_SHARED) \
$(LIBHCFETCHLET_SHARED) \
$(LIBSGAFETCHLET_SHARED)

Link Oracle pour Netbackup nouvelle Installation

Après une nouvelle installation du Netbackup pour une nouvelle base de donnée (sous UNIX) il faut crée le link pour l’agent Oracle et l’installation de la Library dans le Oracle Home ($ORACLE_HOME/lib).
Sans cette installation le RMAN va générer l’erreur suivante :

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of allocate command on ch00 channel at 06/25/2010 15:40:02
ORA-19554: error allocating device, device type: SBT_TAPE, device name:  
ORA-27211: Failed to load Media Management Library

Alors il faut exécuter la procédure suivante avec le user Oracle:

oracle@hostname: /appl/oracle/product/10.2.0.4 /lib >#/usr/openv/netbackup/bin/oracle_link
Fri Jun 25 15:53:05 WAT 2010
All Oracle instances should be shutdown before running this script.
 
Please log into the Unix system as the Oracle owner for running this script
 
Do you want to continue? (y/n) [n] y
 
 
LIBOBK path: /usr/openv/netbackup/bin
ORACLE_HOME: /appl/oracle/product/10.2.0.4
Oracle version: 10.2.0.4.0
Linking LIBOBK (64 bits):
ln -s /usr/openv/netbackup/bin/libobk.sl64 /appl/oracle/product/10.2.0.4/lib/libobk.sl
Done
 
Please check the trace file located in /tmp/make_trace.27820  
to make sure the linking process was successful.
oracle@hostname: /appl/oracle/product/10.2.0.4/lib >#