My path to Oracle OCP 12c (I)

In the begining of this year, 2016, i begun my path for the certification OCP 12c. I was OCA 10g, but this certification was deprecated the past March, so i have to update it. I had found that the best way, proposed by Oracle University, was the path called “Upgrade Oracle9i/10g/11g OCA to Oracle Database 12c OCP”, which was even a jump from OCA (the basic Oracle certification) to OCP (middle Oracle certification). I only needed two things:

  • A course, choosing it from a set of various Oracle courses.
  • Pass the 1z0-067 exam.

It seems easy. So i begun my path. First, talked with my company to comunicate my plan. They were agree with me, so i choose a simple course in the modality of ‘Autostudy CD’, the most cheap. First error. When i finished my course and asked Oracle for a certification, the told me that with the modality of ‘Autostudy CD’ there is no course certification, and even that with this modality, the course was not valid for the certification path.

Ok. A bit angree, i continued studing. I bought a book in Amazon called “Study Guide for 1Z0-067: Upgrade Oracle9i/10g/11g OCA to Oracle Database 12c OCP: Oracle Certification Prep“. Another error. That book is a resume, very thin resume, of the whole books that have Oracle to look for the very complicated questions in the exam. If somebody wants a book to study for this exam, that book does not exists. In fact, if you want to be ready for this exam, you have many books. The hole Oracle 12c documentation, that you can find here: more than 200 books. Very depresive.

I did not have time(neither now) for read that set of Oracle books. So, i tried to find an alternative way. I found CertBest, a web page with a plenty of real exams with free access. So i began to study with that reference. Even i found that other portals, like pass4sure had the same questions with the same correct answers. That was fantastic. Finally, i had a good way to prepare my exam. The third error. And, another time, very depresive.

Two weeks ago i thought i was ready for the exam. But, by chance, i found another interesting link called aiotestking, plenty of certification real exams. The best thing here is that the questions have many comments of people that are in the same path that myself. And then i realized that the answers i believed were true, in fact they were wrong: i had almost 60% of wrong answers. How i discovered that? By the very active users. One of them, nickname Tri, a man from Vietnam, posted one day that he was ready for the exam. Even he posted his facebook address. I look for him in facebook and i discovered that he pass the exam. So his answers are very reliables.

Now i think i have a correct way.

(to be continued)

Fatal error trying to open a database

Since now on, and perhaps because my need of improve, i will write my post in English. Sorry for the spanish readers, but i need to improve my English, and write in that language is a way.

This was a very complicated case, because like as usual, there was no procedure to fix it in an easy way. I hope you, reader, who come here looking for a similar error, to have a little more luck than me, and finally find what were you looking for.

The facts were as follows. In the morning of July first (2014), one of my company’s Oracle databases was down. When the operator tried to open it, these were the errors:

SMON: enabling cache recovery
Tue Jul 1 13:26:22 2014
Undo Segment 1 Onlined
Undo Segment 2 Onlined
Undo Segment 3 Onlined
Undo Segment 4 Onlined
Undo Segment 5 Onlined
Undo Segment 6 Onlined
Undo Segment 7 Onlined
Undo Segment 8 Onlined
Undo Segment 9 Onlined
Undo Segment 10 Onlined
Successfully onlined Undo Tablespace 1.
Dictionary check beginning
Dictionary check complete
Tue Jul 1 13:26:23 2014
SMON: enabling tx recovery
Tue Jul 1 13:26:23 2014
Database Characterset is WE8ISO8859P1
ORA-01555 caused by SQL statement below (Query Duration=0 sec, SCN: 0x0000 4001871b):
Tue Jul 1 13:26:23 2014
select increment$,minvalue,maxvalue,cycle#,order$,cache,highwater,audit$,f ags from seq$ where obj#=:1
Tue Jul 1 13:26:23 2014
Errors in file /u01/app/oracle/admin/BDPR/udump/itdb_ora_26510.trc:
ORA-00604: error producido a nivel 1 de SQL recursivo
ORA-01555: instantanea demasiado antigua: numero de segmento de rollback 8 con nombre "_SYSSMU8$" demasiado pequeño
Error 604 happened during db open, shutting down database
USER: terminating instance due to error 604
Instance terminated by USER, pid = 26510
ORA-1092 signalled during: alter database open...

Very ugly. So, we had one or more ‘ORA-01555’ (snapshot too old) every time we tried to open the database.

Leer más de esta entrada

gcc: Error interno: `Violación de segmento’ (programa cc1)

Or in English:

gcc: Internal error: 'Segment fault' (program cc1)

Este error me ha dado bastantes quebraderos de cabeza. Me lo he encontrado al ejecutar el script ‘$ORA_CRS_HOME/install/root102.sh‘ como último paso en la aplicación del parche 10.2.0.4 en un entorno Oracle RAC. Exactamente, el error era este:

[root@localhost ~]# /opt/crs/oracle/10.2.0/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /opt/crs/oracle/10.2.0
Relinking some shared libraries.
gcc: Error interno: `Violación de segmento' (programa cc1)
Por favor envíe un reporte completo de error.
Vea <URL:http://bugzilla.redhat.com/bugzilla> para más instrucciones.
mv: no se puede efectuar `stat' sobre "ntcontab.o": No existe el fichero o el directorio
/usr/bin/ar: /opt/crs/oracle/10.2.0/lib/ntcontab.o: No such file or directory
make: *** [ntcontab.o] Error 1
gcc: Error interno: `Violación de segmento' (programa cc1)
Por favor envíe un reporte completo de error.
Vea <URL:http://bugzilla.redhat.com/bugzilla> para más instrucciones.
mv: no se puede efectuar `stat' sobre "nnfgt.o": No existe el fichero o el directorio
/usr/bin/ar: /opt/crs/oracle/10.2.0/lib32/nnfgt.o: No such file or directory
gcc: Error interno: `Violación de segmento' (programa cc1)
Por favor envíe un reporte completo de error.
Vea <URL:http://bugzilla.redhat.com/bugzilla> para más instrucciones.
mv: no se puede efectuar `stat' sobre "nnfgt.o": No existe el fichero o el directorio
/usr/bin/ar: /opt/crs/oracle/10.2.0/lib/nnfgt.o: No such file or directory
make: *** [nnfgt.o] Error 1

Relinking of patched files is complete.
WARNING: directory '/opt/crs/oracle' is not owned by root
WARNING: directory '/opt/crs' is not owned by root
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
ocrcheck failed. Check /opt/crs/oracle/10.2.0/srvm/log for more details

Leer más de esta entrada

PRKN-1008 : Unable to load the shared library “srvmhas10”

Recientemente hemos tenido que instalar un nuevo Oracle RAC (todavía 10.2), pero en nuevas versiones de Red Hat, en concreto RHEL5.9 64 bits (para el que haya llegado aquí, esta es la versión del kernel ‘2.6.18-348.el5 #1 SMP Wed Nov 28 21:22:00 EST 2012 x86_64 x86_64 x86_64 GNU/Linux‘). Después de solucionar varios errores recogidos en Oracle Support, me encontré con éste que a continuación relato al ejecutar vipca, de muy sencilla solución, pero cuyo descubrimiento se hizo de rogar.

Como digo, al ejecutar el comando vipca (aún no se ha terminado la instalación, y estoy en el último nodo del clúster como usuario root), después de haber resuelto algún que otro error (el último, el que describe la nota 414163.1), recibía la siguiente salida:

PRKH-1010 : Unable to communicate with CRS services.
[PRKH-1000 : Unable to load the SRVM HAS shared library
[PRKN-1008 : Unable to load the shared library "srvmhas10"
or a dependent library, from
LD_LIBRARY_PATH="/u01/app/oracle/product/10.2.0/crs/jdk/jre/lib/i386/client:/u01/app/oracle/product/10.2.0/crs/jdk/jre/lib/i386:/u01/app/oracle/product/10.2.0/crs/jdk/jre/../lib/i386:/u01/app/oracle/product/10.2.0/crs/lib32:/u01/app/oracle/product/10.2.0/crs/srvm/lib32:/u01/app/oracle/product/10.2.0/crs/lib:/u01/app/oracle/product/10.2.0/crs/srvm/lib:/u01/app/oracle/product/10.2.0/crs/lib:/u01/app/oracle/product/10.2.0/crs/oracm/lib:/lib:/usr/lib:/usr/local/lib"
[java.lang.UnsatisfiedLinkError: /u01/app/oracle/product/10.2.0/crs/lib32/libsrvmhas10.so: libclntsh.so.10.1: cannot open shared object file: No such file ordirectory]]]

Leer más de esta entrada

ADRCI. Generar un package incident

Tras un error tipo ORA- en Oracle 11g, cómo generar un paquete con los ficheros de traza necesarios para enviar a Oracle Support.

Para mostrarlo vía un ejemplo, se genera un error simple intentando borrar una tabla que no existe. Previamente, se activa la traza desde una sesión sqlplus para que este error aparezca en el alert.
SQL> alter session set events ‘942 incident(table_missing)’;

Session altered.

Se procede a ejecutar una instrucción para borrar cualquier tabla que no exista:
SQL> drop table no_existe;
drop table no_existe
*
ERROR at line 1:
ORA-00942: table or view does not exist

Mientras se hace esto, en otra sesión se puede monitorizar, mediante adrci, el alert de la instancia:

adrci> show homes;
ADR Homes:
diag/rdbms/HOME01
diag/rdbms/HOME02
adrci> set home diag/rdbms/HOME01
adrci> show alert -tail -f
2014-03-12 12:33:56.842000 +01:00
Thread 1 advanced to log sequence 44584 (LGWR switch)
Current log# 1 seq# 44584 mem# 0: +DGDAT/SID01/onlinelog/group_1.267.822824621
Current log# 1 seq# 44584 mem# 1: +DGFLA/SID01/onlinelog/group_1.257.822824621
Cuando se ejecute el borrado de la tabla, en adrci aparecerá algo como lo siguiente:
2014-03-12 12:53:19.203000 +01:00
Errors in file /oracledb/diag/rdbms/emrepru/SID01/trace/SID_ora_4146.trc  (incident=7925):
ORA-00700: soft internal error, arguments: [EVENT_CREATED_INCIDENT], [942], [TABLE_MISSING], [], [], [], [], [], [], [], [], []
ORA-00942: table or view does not exist
Incident details in: /oracledb/diag/rdbms/emrepru/SID01/incident/incdir_7925/SID01_ora_4146_i7925.trc
Hecho esto, desde sqlplus, se desactiva la traza:
SQL> alter session set events ‘942 trace name context off’;

Session altered.

Ahora, desde adrci, se consulta el incidente que el sistema ha creado:
adrci> show incident;

ADR Home = /oracledb/diag/rdbms/emrepru/EMREPRU:
*************************************************************************
INCIDENT_ID          PROBLEM_KEY                                                 CREATE_TIME
——————– ———————————————————– —————————————-
7925                 ORA 700 [EVENT_CREATED_INCIDENT] [942] [TABLE_MISSING]      2014-03-12 12:53:19.203000 +01:00
1 rows fetched

Con el INCIDENT_ID, se crea el ‘package incident‘:
adrci> ips create package incident 7925;
Created package 1 based on incident id 7925, correlation level typical
Finalmente, se le dice al sistema dónde depositar el fichero (un zip) con los datos del incidente. Es conveniente, dependiendo claro está del incidente, confirmar que existe suficiente espacio libre en el volumen dónde se quiere depositar este fichero:
adrci> ips generate package 1 in /home/oracle;
Generated package 1 in file /home/oracle/ORA700EVE_20140312125645_COM_1.zip, mode complete

ORA-39181

Este error lo recibimos tras ejecutar un export haciendo uso de datapump en una base de datos Oracle 11g. En el fichero de log veremos entradas similares a estas:

ORA-39181: Only partial table data may be exported due to fine grain access control on "SYSMAN"."EM_EVENT_SEQUENCES":"OPEN"
ORA-39181: Only partial table data may be exported due to fine grain access control on "SYSMAN"."EM_EVENT_SEQUENCES":"P201308"
ORA-39181: Only partial table data may be exported due to fine grain access control on "SYSMAN"."EM_EVENT_SEQUENCES":"P201309"
ORA-39181: Only partial table data may be exported due to fine grain access control on "SYSMAN"."EM_ISSUES_INTERNAL":"OPEN"

Este error, según la documentación de My Oracle Support (nota 422480.1), es debido a que un usuario sin el privilegio adecuado está intentando exportar una tabla que tiene activada la política fine grain access control. De esta forma, solo las filas que pueden ser vistas por el usuario que ejecuta el export serán exportadas. Es decir, se tendrá un export consistente, pero con el peligro de que determinadas filas no se podrán recuperar del mismo en caso de que fuese necesario.

Para solucionar esta eventualidad basta con asignar el privilegio EXEMPT ACCESS POLICY al usuario que está ejecutando el export.

Leer más de esta entrada

Uso excesivo de CPU tras la instalación de Oracle 11g

Un problema que me reportó un compañero de trabajo (twitter @b0mbista), y que él mismo solucionó tras una búsqueda en Google. Después, consultado a My Oracle Support, descubrimos que es un error conocido y documentado por Oracle; e incluso existe un parche que lo soluciona (nosotros aún no lo hemos probado). No obstante, y parche aparte, el workaround del problema es muy sencillo (y si que se ha probado con éxito).

La situación es la siguiente. Una vez instalada y puesta en funcionamiento una base de datos Oracle 11g, donde se ha configurado la monitorización a través de Enterprise Manager (dbconsole), el uso de la CPU en el servidor ronda el 100%, con lo que el rendimiento queda gravemente degradado.

Con una consulta de las sesiones más conflictivas se descubre que estas son del esquema SYSMAN, y las querys que aparecen son como la siguiente:

SELECT EXECUTION_ID, STATUS, STATUS_DETAIL FROM MGMT_JOB_EXEC_SUMMARY 
WHERE JOB_ID = :B3 AND 
TARGET_LIST_INDEX = :B2 AND EXPECTED_START_TIME = :B1

Leer más de esta entrada