lundi 4 novembre 2013

Comment vérifier si RAC est activée dans un ORACLE_HOME?

Dans un environnement unix (autre que AIX) et linux, pour vérifier si RAC est activé pour un  home oracle utiliser la commande "ar" comme suit:

ar -t $ORACLE_HOME/rdbms/lib/libknlopt.a|grep kcsm.o

Si RAC est activé la commande retourne "kcsm.o" sinon elle ne retourne rien.

Note:
L'archive "libknlopt.a" contient les fichiers indiquant les différentes composantes installées.


Automatic Storage Mgt ON=kfon.o
Automatic Storage Mgt OFF=kfoff.o

Context Management Text ON=kciwcx.o <<CTX est toujours activé et ne peut être désactivé.

Oracle Data Mining ON=dmwdm.o
Oracle Data Mining OFF=dmndm.o

Oracle Database Vault ON=kzvidv.o
Oracle Database Vault OFF=kzvndv.o

Oracle OLAP ON=xsyeolap.o
Oracle OLAP OFF=xsnoolap.o

Oracle Label Security ON= kzlilbac.o
Oracle Label Security OFF= kzlnlbac.o

Oracle Partitioning ON=kkpoban.o
Oracle Partitioning OFF=ksnkkpo.o

Real Application Cluster ON=kcsm.o
Real Application Cluster OFF=ksnkcs.o

Oracle Real Application Testing ON=kecwr.o
Oracle Real Application Testing OFF=kecnr.o
Exemple:

1- Dans un environnement où RAC est activé (qu'il s'agisse du home du grid infrastructure ou d'un home base de données):

[oracle@svrhost1 ~]$ ar -t $ORACLE_HOME/rdbms/lib/libknlopt.a|grep kcsm.o
kcsm.o
[oracle@
svrhost1 ~]$

2- Dans un environnement où RAC n'est pas activé (qu'il s'agisse du home du grid infrastructure ou d'un home base de données):

[oracle@testhost ~]$ ar -t $ORACLE_HOME/rdbms/lib/libknlopt.a|grep kcsm.o
[oracle@
testhost ~]$

Lorsque RAC n'est pas activé, le fichier contenu dans l'archive est "ksnkcs.o":

[oracle@testhost ~]$ ar -t $ORACLE_HOME/rdbms/lib/libknlopt.a|grep ksnkcs.o  
ksnkcs.o
[oracle@testhost ~]$

Hope it helps...

vendredi 4 octobre 2013

L'outil "sosreport" sur Oracle Linux

L'outil "sosreport" permet de collecter les informations sur le hardware et les configurations de Linux.

Pour l'utiliser:

[root@host ~]# sosreport

sosreport (version 1.7)

This utility will collect some detailed  information about the
hardware and  setup of your  Enterprise Linux  system.
The information is collected and an archive is  packaged under
/tmp, which you can send to a support representative.
This information will be used for diagnostic purposes ONLY
and it will be considered confidential information.

This process may take a while to complete.
No changes will be made to your system.

Press ENTER to continue, or CTRL-C to quit.


One or more plugins have detected a problem in your configuration.
Please review the following messages:

process:
    * one or more processes are in state D (sosreport might hang)

Are you sure you would like to continue (y/n) ? y

Please enter your first initial and last name [texans]: hetche
Please enter the case number that you are generating this report for: 1

 plugin system finished ...
 Completed.

Creating compressed archive...

Your sosreport has been generated and saved in:
  /tmp/sosreport-hetche.1-797857-a51333.tar.bz2

The md5sum is: b9c7ff320009c7b19ad48b93eca51333

Please send this file to your support representative.


Par défaut le résultat est généré dans le répertoire /tmp.
Pour le générer à un autre emplacement, lancer l'utilitaire comme suit:

TMP=/home/hetche sosreport

Hope it helps...

lundi 30 septembre 2013

Lecture des fichiers binaires avec la command "strings"

La commande strings peut être utilisé pour visualiser le contenu d'un fichier binaire.

Par exemple, pour voir le contenu d'un fichier olr dans un environnement grid infrastructure 11g (en cluster ou en standalone):

sudo su -
cd $GRID_HOME/cdata
strings host1.olr

Exemple de contenu obtenu:

[root@host1 cdata]# strings host1.olr |grep SPFile
tp://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd" ProfileSequence="36" ClusterUId="63077d79ae5dcf99fff118cfb1a5c515" ClusterName="crstest11g" PALocation=""><gpnp:Network-Profile><gpnp:HostNetwork id="gen" HostName="*"><gpnp:Network id="net1" IP="142.41.242.0" Adapter="bond0" Use="public"/><gpnp:Network id="net2" IP="192.168.30.0" Adapter="bond1" Use="cluster_interconnect"/></gpnp:HostNetwork></gpnp:Network-Profile><orcl:CSS-Profile id="css" DiscoveryString="+asm" LeaseDuration="400"/><orcl:ASM-Profile id="asm" DiscoveryString="/dev/oracleasm/disks/*" SPFile="+OCR_VOTE/crstest11g/asmparameterfile/registry.253.801067269"/><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="gpnp orcl xsi"/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>3mfJqBrkkNz2lvK1CJXvq2/UtJw=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>scGjbnPKShIDg/NAVJXkn399lt7ifLjbdH6DAHVZnJGSOmZwlcrfSL/mqOHyzHNgtRyhW6yGs+rXukexq0dPI+PtiLTkN6yX1JrC6rdsxemwtoPJAyA9X5lJhdcy4nfNQ/Mv0+nfGlnMXcvBIhGjPiLeFtKmuGUHOvbz+U47hfk=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>
[root@host1 cdata]#


Hope it helps....

mardi 20 août 2013

ORA-13236: internal error in R-tree processing: [Snapshot too old or Recursive fetch error]

Après avoir migré de la version 10.2.0.3 vers la version 11.2.0.3, il arrive que des requêtes incluant des tables partitionnées contenant des données spatial donnent l'erreur:

ERREUR Ó la ligne 1 :
ORA-13236: erreur interne dans le traitement R-tree : [Snapshot too old or Recursive fetch error]
ORA-13234: Úchec de l'accÞs Ó la table d'index R-tree [MDRT Table]
ORA-29400: erreur de cartouche de donnÚes
ORA-01031: privilÞges insuffisants
ORA-06512: Ó "MDSYS.SDO_PQRY", ligne 122
ORA-06512: Ó ligne 1


Voir le document suivant de My Oracle Support:
ORA-13236 [Snapshot too old or Recursive fetch error] on cross-schema Spatial Query [ID 1303804.1]

Le problème est dû au fait qu'avec les nouvelles versions d'oracle (depuis la version 10.2.0.4) il faut faire un GRANT explicite sur les tables MDRT générées par les indexes spatial.

Voici un petit script pour faire ce GRANT sur toutes les tables MDRT concernées:

set pagesize 1000
spool c:\temp\grant_mdrt.sql
select 'grant select on '|| c.table_owner || '.' || c.sdo_index_table || ' to ' || d.grantee || ';'   from DBA_PART_TABLES a, dba_tab_columns b, all_sdo_index_info c , dba_tab_privs d
where a.owner not in ('SYS','SYSTEM')
and a.owner = b.owner
and a.table_name = b.table_name
and b.data_type like '%SDO_GEOMETRY'
and b.owner = c.table_owner
and b.table_name = c.table_name
and a.owner = d.owner
and a.table_name = d.table_name
and d.privilege = '
SELECT' ;
spool off;

Exécuter par la suite le fichier sql obtenu:
@c:\temp\grant_mdrt.sql

Hope it helps...

OPatch found the word "warning" in the stderr of the make command

En appliquant des patches oracle il se peut que vous rencontriez l'avertissement suivant (ou un message similaire):

OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/ora01/logi/oracle/product/bd11203p/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'
/ora01/logi/oracle/product/bd11203p/precomp/lib/ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/ora01/logi/oracle/product/bd11203p/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'

Composite patch 14727310 successfully applied.
OPatch Session completed with warnings.
Log file location: /ora01/logi/oracle/product/bd11203p/cfgtoollogs/opatch/opatch2013-02-15_15-26-36PM_1.log

OPatch completed with warnings.

Voir le document de My Oracle Support:
Opatch warning: overriding commands for target xxxx [ID 1448337.1]

Selon ce document, il s'agit tout simplement d'un avertissement qui peut être ignoré.

Hope it helps...