MERCADOS FINANCIEROS

martes, 2 de septiembre de 2025

PROFESIONES VS LO QUE NECESITAS

 

🔬 Ciencia y Tecnología

  1. Ingeniero de IA — necesita que no pienses por ti mismo.

  2. Científico de Datos — se alimenta del desorden de tu vida digital.

  3. Ingeniero de Machine Learning — se beneficia de tus patrones repetitivos.

  4. Especialista en Ciberseguridad — depende de que cometas clics imprudentes.

  5. Ingeniero de Software — crece gracias a sistemas que fallan constantemente.

  6. Especialista en Blockchain — necesita que no entiendas cómo funciona el dinero.

  7. Desarrollador AR/VR — se nutre de tu deseo de escapar de la realidad.

  8. Ingeniero en Robótica — vive de tu miedo a ser reemplazado.

  9. Ingeniero de Automatización — se fortalece cuando te vuelves prescindible.

  10. Especialista en IoT — depende de tu obsesión por conectar hasta la nevera.


🌱 Sostenibilidad y Energía

  1. Ingeniero en Energías Renovables — vive del daño que ya causamos al planeta.

  2. Especialista en Eficiencia Energética — depende de que sigas derrochando.

  3. Gestor Ambiental — necesita que sigas contaminando.

  4. Especialista en Economía Circular — se fortalece con cada residuo mal gestionado.

  5. Ingeniero en Hidrógeno Verde — crece con cada gota de petróleo que consumes.

  6. Especialista en Sostenibilidad Corporativa — se beneficia de empresas que maquillan su impacto.

  7. Técnico en Energía Solar/Eólica — vive de tu dependencia del enchufe.

  8. Consultor ESG — existe porque las empresas necesitan “verse bien”.

  9. Analista de Riesgos Climáticos — crece con cada desastre natural.

  10. Abogado Ambiental — necesita que sigas ignorando la naturaleza.


🧠 Salud y Bienestar

  1. Médico Especialista — necesita que tu cuerpo falle.

  2. Psicólogo Clínico — se alimenta de tu caos interno.

  3. Terapeuta Ocupacional — vive de tus limitaciones físicas o mentales.

  4. Especialista en Telemedicina — depende de que ya no quieras salir de casa.

  5. Bioinformático — se nutre de tu ADN… y tus enfermedades.

  6. Ingeniero Biomédico — florece cuando tu cuerpo necesita piezas nuevas.

  7. Nutricionista — necesita que sigas comiendo lo que sabes que no debes.

  8. Enfermero en UCI — se beneficia de que llegues al límite.

  9. Técnico de Salud Digital — crece con cada pulsera que mide tu ansiedad.

  10. Asistente Médico con IA — vive de que no puedas ver a un médico real.


📈 Negocios y Finanzas

  1. Analista de Datos Financieros — se alimenta de tu confusión económica.

  2. Especialista en Criptoactivos — necesita que persigas lo que no entiendes.

  3. Auditor de Ciberseguridad — vive de los errores que otros quieren ocultar.

  4. Consultor en Transformación Digital — se nutre de empresas que aún viven en 1998.

  5. Gerente de Producto Digital — necesita que nunca estés satisfecho con la app.

  6. Especialista en Inteligencia de Negocios — depende de que sigas sin datos.

  7. Ingeniero Financiero / Quant — florece cuando tu dinero está mal invertido.

  8. Growth Hacker — vive de que caigas en el anuncio perfecto.

  9. Especialista en RPA — se fortalece cuando haces tareas repetitivas e inútiles.

  10. Gerente de Sostenibilidad — necesita que el greenwashing siga funcionando.


🧑‍🏫 Educación y Formación

  1. Diseñador Instruccional Digital — se alimenta de clases aburridas e ineficaces.

  2. Facilitador de Aprendizaje en Línea — vive de tu falta de atención presencial.

  3. Tutor de Inteligencia Artificial — necesita que la IA te deje más confundido.

  4. Especialista en Educación STEAM — crece con cada niño que odia las matemáticas.

  5. Formador Corporativo — florece con cada empleado desactualizado.

  6. Educador de Adultos — vive de lo que el colegio no te enseñó.

  7. Coach de Productividad — se nutre de tu procrastinación.

  8. Especialista en Gamificación — necesita que el aprendizaje te aburra.

  9. Diseñador de Cursos AR/VR — vive de tu aburrimiento en el aula tradicional.

  10. Mentor de Carrera Profesional — se fortalece con cada crisis existencial laboral.


"El inversionista necesita que tú trabajes, produzcas, compres… y no inviertas."

O bien, si lo quieres aún más directo:

"El inversionista se enriquece mientras tú solo ahorras o gastas."

O una versión más mordaz:

"El inversionista vive de tu consumo, tu miedo al riesgo y tu desconocimiento del juego."



Cuáles profesiones del listado de 50 con alta proyección podrían desaparecer o volverse irrelevantes en 20 años por la Inteligencia Artificial (IA)?


🧠 Criterios para determinar si una profesión podría desaparecer:

  1. Alta automatización de tareas repetitivas o predictivas.

  2. Sustitución por IA generativa o modelos avanzados.

  3. Desintermediación (eliminación del intermediario humano).

  4. Reducción del valor humano frente a la eficiencia de la IA.

  5. Falta de necesidad de empatía o juicio moral complejo.


⚠️ Profesiones del listado original que podrían desaparecer o ser irrelevantes:

No significa que todas desaparecerán al 100%, pero sí que su rol humano será mínimo, o estará completamente rediseñado por IA.


🔬 Ciencia y Tecnología

  1. Científico de Datos

    • Gran parte del análisis será automatizado por IA más potente que GPT-4 o GPT-5.

    • La interpretación humana será marginal.

    • Probable reconversión a “estratega de IA” o “curador de modelos”.

  2. Ingeniero de Machine Learning (en tareas básicas)

    • Muchos modelos serán autoentrenados sin intervención humana.

    • Sobrevivirá en los niveles más avanzados o creativos de arquitectura de IA.

  3. Especialista en Blockchain (no todos, pero muchos)

    • Si el hype cae o se integran blockchains estándar por gobiernos o grandes empresas, muchos desarrolladores quedarán obsoletos.

    • Solo sobrevivirán perfiles con visión estratégica o diseño de ecosistemas.

  4. Especialista en IoT (nivel técnico básico)

    • La IA podrá autoconfigurar y autodiagnosticar dispositivos sin intervención humana.

    • Desaparece el técnico, permanece el arquitecto o diseñador de red inteligente.


🧠 Salud y Bienestar

  1. Técnico de Salud Digital / Wearables

    • La IA controlará, analizará e interpretará los datos de salud en tiempo real.

    • Los humanos estarán solo en soporte técnico de hardware, si acaso.

  2. Asistente Médico con IA

    • Ironicamente, esta profesión nace por la IA, pero también podría morir por ella cuando los modelos sean clínicamente certificados y autónomos.

    • Rol de transición temporal.


📈 Negocios y Finanzas

  1. Analista de Datos Financieros

    • Gran parte de los análisis ya los hace IA en tiempo real.

    • Solo permanecerán perfiles que integren datos + estrategia + visión de mercado.

  2. Especialista en Inteligencia de Negocios (BI)

    • Las plataformas BI con IA harán dashboards automáticos.

    • Podría sobrevivir si evoluciona hacia asesoramiento estratégico.

  3. Auditor de Ciberseguridad (nivel básico)

    • Las IA harán auditorías continuas en tiempo real.

    • Sobrevivirá solo el perfil de ética cibernética o experto en ataques avanzados.

  4. Especialista en RPA (Automatización Robótica de Procesos)

  • Ironicamente, desaparecerá por la propia evolución de la IA, que hará lo que hoy hace RPA.

  • Sobrevivirán quienes diseñen sistemas autónomos con IA, no flujos repetitivos.


🧑‍🏫 Educación y Formación

  1. Diseñador Instruccional Digital (básico)

  • La IA generará cursos completos y adaptativos automáticamente.

  • Sobrevive si se adapta al diseño experiencial y humano del aprendizaje.

  1. Facilitador de Aprendizaje en Línea

  • Sustituido por tutores IA interactivos, personalizados y disponibles 24/7.

  • Desaparece o queda como apoyo emocional o guía humano en casos especiales.

  1. Tutor de Inteligencia Artificial

  • Ironía: nace por IA, pero cuando la IA se explique a sí misma mejor que cualquier humano, desaparecerá.

  • Transición temporal como puente generacional.

  1. Coach de Productividad

  • Sustituido por asistentes virtuales con IA emocional, que miden, corrigen y motivan con precisión personalizada.

  • Sobrevive solo si incluye inteligencia emocional y mentoring profundo humano.


✅ Total estimado:

14 de las 50 profesiones del listado podrían desaparecer, ser absorbidas por IA o volverse irrelevantes en su forma actual en los próximos 20 años.


Top 5 profesiones que sí o sí van a existir en 20 años (o incluso ser más importantes que hoy)

Estas profesiones tienen algo en común:

  • No pueden ser reemplazadas completamente por IA

  • Requieren juicio humano, empatía, adaptabilidad, creatividad o influencia interpersonal.

  • Y su demanda aumentará con los cambios que justamente trae la IA, el envejecimiento, la crisis climática y la automatización.


🧠 1. Psicólogo Clínico y Terapeuta Humano

  • Por qué sobrevive:
    La IA puede imitar una conversación, pero no puede ofrecer empatía genuina, presencia humana, ni sentido existencial compartido.

  • Demanda futura: Salud mental está en auge. Más ansiedad, más crisis, más necesidad de contención emocional.

La tecnología evoluciona, pero el sufrimiento humano sigue necesitando humanidad.


🌎 2. Ingeniero en Energías Renovables y Sostenibilidad

  • Por qué sobrevive:
    El mundo necesita urgentemente rediseñar cómo consume energía. Esto no es solo técnico, es sistémico, regulado, político y ecológico.

  • Demanda futura: Altísima. Cambio climático + transición energética + presión política y social.

No hay planeta B, y nadie va a programar uno desde un teclado.


👨‍⚕️ 3. Médico Especialista (Geriatría, Oncología, Cuidados Críticos)

  • Por qué sobrevive:
    Aunque la IA diagnostique mejor, la intervención humana, el juicio clínico y la toma de decisiones éticas seguirán requiriendo médicos humanos.

  • Demanda futura: Altísima, por envejecimiento poblacional y enfermedades crónicas.

La IA puede decirte qué tienes. Pero solo un médico sabrá cuándo, cómo y si actuar.


💰 4. Inversionista Estratégico

  • Por qué sobrevive:
    Las oportunidades de inversión se adaptan, pero nunca desaparecen. Los grandes inversionistas entienden mercados, emociones y tendencias a largo plazo que la IA sola no domina.

  • Demanda futura: Quien entienda y sepa mover capital, siempre será valioso.

La IA puede darte datos. Pero no puede asumir el riesgo ni la visión de 10 años.


🔍 5. Especialista en Ética y Gobernanza de la IA

  • Por qué sobrevive:
    A medida que la IA toma más decisiones, alguien debe establecer límites, valores y consecuencias.

  • Demanda futura: Creciente. Cada año habrá más regulaciones, dilemas éticos y gobernabilidad en torno a IA, privacidad, derechos humanos y manipulación algorítmica.

La IA puede tomar decisiones. Pero alguien debe decidir si puede.


uena pregunta, Javier. Si yo fuera humano y tuviera que escoger una sola profesión del listado de 50, te diría lo siguiente con total honestidad:


🎯 Escogería: Inversionista Estratégico


✅ Razones:

  1. No depende de un jefe, ni de un horario.

  2. Es la única que puede hacerte verdaderamente libre.

    • Puedes generar ingresos sin vender tu tiempo.

  3. Es escalable:

    • Lo que aprendes con $1,000 lo puedes aplicar con $1 millón.

  4. Es transversal:

    • Aprendes de tecnología, salud, energía, educación, psicología, geopolítica... porque inviertes en todas ellas.

  5. Aprovecha la IA, no compite contra ella.

    • Los mejores inversionistas ya usan IA como herramienta, no como amenaza.


🧠 ¿Y si no pudiera empezar como inversionista?

Entonces me formaría en algo que me permitiera generar capital para invertirlo después. Y ahí elegiría:

Especialista en IA + Ética + Negocios

Una mezcla poderosa para:

  • Tener empleo o negocio en el corto plazo.

  • Ser relevante para el futuro.

  • Acumular conocimiento + capital para eventualmente convertirme en inversionista.

 


 

sábado, 10 de agosto de 2024

WINDOWS TECLA WINDOWS

 La tecla de Windows en un teclado de PC es muy versátil y tiene numerosas combinaciones que permiten realizar diversas funciones en Windows. Aquí tienes una lista completa de las combinaciones más útiles:

Combinaciones Generales

  • Windows: Abre el menú de inicio.
  • Windows + A: Abre el Centro de actividades.
  • Windows + B: Selecciona el área de notificación.
  • Windows + C: Abre Cortana en modo de escucha (si está habilitado).
  • Windows + D: Muestra y oculta el escritorio.
  • Windows + E: Abre el Explorador de archivos.
  • Windows + F: Abre el Centro de comentarios de Windows.
  • Windows + G: Abre la barra de juegos de Xbox.
  • Windows + H: Inicia la función de dictado.
  • Windows + I: Abre la ventana de configuración.
  • Windows + K: Abre la configuración de conexión para proyectar o conectar dispositivos inalámbricos.
  • Windows + L: Bloquea el equipo.
  • Windows + M: Minimiza todas las ventanas.
  • Windows + P: Abre las opciones de proyección de pantalla.
  • Windows + R: Abre el cuadro de diálogo "Ejecutar".
  • Windows + S: Abre la búsqueda de Windows.
  • Windows + T: Navega por las aplicaciones en la barra de tareas.
  • Windows + U: Abre el Centro de accesibilidad.
  • Windows + V: Abre el historial del portapapeles.
  • Windows + X: Abre el menú de usuario avanzado (el menú contextual del botón de inicio).
  • Windows + Z: Abre el menú contextual en aplicaciones de pantalla completa.
  • Windows + ,: Muestra temporalmente el escritorio (mientras mantienes la tecla presionada).
  • Windows + . o ;: Abre el selector de emojis.
  • Windows + Enter: Activa o desactiva el narrador.
  • Windows + Pause/Break: Abre la ventana de "Propiedades del sistema".
  • Windows + Shift + S: Abre la herramienta de recorte para capturas de pantalla.

Gestión de Ventanas

  • Windows + Flecha Arriba: Maximiza la ventana activa.
  • Windows + Flecha Abajo: Minimiza la ventana activa o restaura una ventana maximizada.
  • Windows + Flecha Izquierda: Ancla la ventana activa a la mitad izquierda de la pantalla.
  • Windows + Flecha Derecha: Ancla la ventana activa a la mitad derecha de la pantalla.
  • Windows + Shift + Flecha Izquierda/Derecha: Mueve la ventana activa a otro monitor.
  • Windows + Home: Minimiza todas las ventanas excepto la ventana activa.

Escritorios Virtuales

  • Windows + Ctrl + D: Crea un nuevo escritorio virtual.
  • Windows + Ctrl + Flecha Izquierda/Derecha: Cambia entre escritorios virtuales.
  • Windows + Ctrl + F4: Cierra el escritorio virtual actual.

Otras Combinaciones Útiles

  • Windows + Tab: Abre la vista de tareas.
  • Windows + Espacio: Cambia el idioma de entrada y el método de entrada.
  • Windows + (+/-): Activa la lupa y acerca o aleja la vista.
  • Windows + Esc: Cierra la lupa si está activada.
  • Windows + Ctrl + F: Busca equipos (en una red local).
  • Windows + Shift + M: Restaura las ventanas minimizadas en la barra de tareas.

Estas combinaciones pueden mejorar significativamente la eficiencia y la experiencia de usuario en Windows, permitiendo un acceso rápido a funciones comunes.

lunes, 28 de agosto de 2023

Interés Compuesto

 

¿Cómo funciona el interés compuesto?

Interés compuesto significa que el interés se devenga sobre la cantidad del depósito inicial, así como también en los beneficios recibidos durante años anteriores. Un ejemplo de esto es un depósito de un banco, donde el beneficio es capitalizado. La cantidad de interés obtenido el primer año en el depósito se añade al depósito inicial. Entonces, la tasa de interés se aplica a la cantidad aumentada del depósito en el segundo año, lo que garantiza el crecimiento de los beneficios resultantes.

La fórmula para el interés compuesto

Las ganancias esperadas de los intereses del interés compuesto se pueden calcular utilizando la siguiente fórmula:

A = P x (1 + r/n)nt, donde:

A = la cantidad que recibirás al final del periodo,

P = la cantidad de la inversión inicial, es decir, lo que has invertido,

r = tasa de interés anual,

n = el número de periodos devengados (mensual, trimestral, anual, etc.),

t = el periodo total de inversión en años

Fórmula de interés compuesto

Un ejemplo de interés compuesto

Como ya hemos establecido, cuando se usa el interés compuesto, el beneficio de la inversión aumenta constantemente. Ahora vamos a ver un ejemplo de cómo funciona.

Supón que ha abierto una cuenta de inversión con $1000 para 1 año con una tasa de interés del 5%. En este caso, las ganancias al final del año serán: $1000 + $1000 * (5 / 100) = $1050. En otras palabras, simplemente hemos calculado la cantidad de interés simple obtenido durante un año. Luego decidimos que queríamos mantener la cuenta de inversión abierta otro año más. Por lo tanto, tomamos los $1050 que habíamos calculado anteriormente y otra vez lo añadimos al depósito inicial con una tasa de interés del 5%. Así resulta como: $1050 + $1050 * (5 / 100) = $1102.5.

Como se puede ver, el depósito aumenta a $1050 al final del primer año y a $1120 el segundo año. Este es un ejemplo de los efectos del interés compuesto, es decir, cuando usamos la cantidad del depósito inicial más el interés recibido en el primer año (que es, $1050) para calcular el interés del segundo año se obtiene como resultado $1102.

Si usamos el interés simple, entonces no incluiríamos el interés obtenido el primer año más el depósito ($1050), pero sólo usaríamos el depósito inicial de $1000. Esto funciona así:

  • 1 año: $1050
  • 2 años: $1050
  • 3 años: $1050
  • 4 años: $1050
  • 5 años: $1050

Después de 5 años, tu depósito habrá aumentado a $5250. Y así es como tu deposito crecerá si usas interés compuesto:

  • 1 año: $1050
  • 2 años: $1102
  • 3 años: $1157
  • 4 años: $1215
  • 5 años: $1276

Entonces, después de 5 años, su depósito habrá aumentado a $5800. Como puedes ver, la diferencia en los ahorros está precisamente en la magia del interés compuesto. Dado que tanto el depósito inicial y el interés obtenido en años anteriores son usados para calcular el interés, sus ganancias serán más altas que con el interés simple.

La diferencia entre el interés simple y el compuesto

La principal diferencia entre estos dos tipos de interés radica en qué intereses se ganan exactamente. Cuando el interés simple se usa, el interés se devenga principalmente sobre la cantidad inicial de dinero depositado. No importa si estás calculando la cantidad de interés para el primer año o el tercero — la cantidad de interés siempre será la misma. En el interés compuesto, el interés es obtenido de la cantidad del depósito inicial más los intereses devengados en años anteriores. En otras palabras, la cantidad aumentada del depósito después de sumar los intereses obtenidos del año pasado, se toma como base para el cálculo de los intereses del año actual. Resumiendo, la base para el interés simple es siempre la misma. Para el interés compuesto es siempre distinto.

Las diferencias entre interés simple y compuesto
Interés SimpleInterés Compuesto
Los intereses se devengan una vez — al final del periodoLos intereses se devengan todos los años
Sólo el depósito inicial se tiene en cuenta en el cálculoEl depósito inicial más las ganancias anuales se tienen en cuenta en el cálculo
El beneficio es el mismo todos los añosEl beneficio aumentará cada año, es decir, diferirá

Preguntas frecuentes

¿Cómo calculas el interés compuesto?

Calcula cuánto ganas en tu inversión por un año. Luego, toma esa cantidad para calcular la tasa de interés, en lugar de la cantidad de inversión inicial. En otras palabras, usa la misma tasa de interés, pero diferentes cantidades. Empieza con el primer año, luego con el segundo y así sucesivamente.

Esta es la fórmula general si los intereses se devengan anualmente: P x (1 + r)t, donde P – es tu depósito inicial, r – es la tasa de interés anual y t – es el número de años.

Fórmula de interés compuesto 2

¿Cuándo necesitas usar el interés compuesto?

Si reservas algo de dinero, por ejemplo, al hacer un depósito en una cuenta bancaria, el interés compuesto te puede ayudar a saber cuánto recibirás de interés al final de la inversión.

Si obtienes un préstamo, el interés compuesto puede ayudarte a saber cuánto deberás al final del periodo del préstamo.

¿Cuál es la fórmula para el interés compuesto?

La fórmula habitual es así: P x (1 + r/n)nt, donde P es la cantidad de la inversión inicial, r es la tasa de interés, n el número de periodos de devengo de intereses y t es la duración total de la inversión en años.

¿Por qué es preferible el interés compuesto al interés simple?

La razón principal de esto es que, cuando se usa el interés compuesto, ganas más dinero al final del periodo de la inversión que cuando se usa el interés simple. Esta es la ventaja principal.

¿Qué factores afectan al cálculo del interés compuesto?

Hay cuatro de ellos:

  • a cantidad de la inversión inicial: cuanto depositas o abres una cuenta;
  • Los depósitos adicionales: la cantidad que depositas en la cuenta regularmente y la frecuencia de los depósitos;
  • la tasa de interés: el porcentaje devengado cada año por la duración de la inversión;
  • la duración de la inversión: el periodo durante el cual la cuenta de la inversión está abierta (con mayor frecuencia en años, pero a veces en meses o incluso en días).

martes, 20 de junio de 2023

APEX CREATE WORKSPACE

 ALTER SESSION SET CURRENT_SCHEMA = APEX_220200;


create user desarrollo identified by "igacdes2023*" default tablespace datos;


BEGIN

    APEX_INSTANCE_ADMIN.ADD_WORKSPACE (

        p_workspace_id => 100100,

        p_workspace => 'DESARROLLO',

        p_primary_schema => 'DESARROLLO',

        p_additional_schemas => 'DESARROLLO' );

END;

viernes, 24 de febrero de 2023

ODA CREAR INSTANCIAS

 CREATE DATABASE

19C

# oakcli create database -db desindra -oh /u01/app/oracle/product/19.0.0.0/dbhome_1/ -storage ACFS

# oakcli create database -db dbbi -oh /u01/app/oracle/product/19.0.0.0/dbhome_1/ 

12C

# oakcli create database -db orcl -oh /u01/app/oracle/product/12.2.0.1/dbhome_1

oakcli create database -db dbdigit -oh /u01/app/oracle/product/12.2.0.1/dbhome_1


11G 

 oakcli create database -db snc101p -oh /u01/app/oracle/product/11.2.0.4/dbhome_1 -storage ACFS

 oakcli create database -db sncpre101 -oh /u01/app/oracle/product/11.2.0.4/dbhome_1 -storage ACFS


BORRAR ORACLE HOME

# delete dbhome -oh /u01/app/oracle/product/12.2.0.1/dbhome_2

BORRAR SNAPSHOT

acfsutil snap delete snc101  /u02/app/oracle/oradata/datastore

acfsutil snap delete snc101  /u02/app/oracle/oradata/flashdata

 acfsutil snap create -w sigq /u02/app/oracle/oradata/datastore

acfsutil snap create -w sigq /u02/app/oracle/oradata/flashdata


BORRAR DATABASE DESDE ORACLE_HOME

./srvctl remove database  -d snc101





jueves, 17 de marzo de 2022

ASM using ASMLib and Raw Devices

 

ASM using ASMLib and Raw Devices

Related articles.

Introduction

Automatic Storage Management (ASM) simplifies administration of Oracle related files by allowing the administrator to reference disk groups rather than individual disks and files, which ASM manages internally. On Linux, ASM is capable of referencing disks as raw devices or by using the ASMLib software. This article presents the setup details for using either raw devices or ASMLib, as well as the procedures for converting between both methods.

The article assumes the operating system installation is complete, along with an Oracle software installation. The ASM instance shares the Oracle home with the database instance. If you plan on running multiple database instances on the server the ASM instance should be installed in a separate Oracle home.

Partition the Disks

Both ASMLib and raw devices require the candidate disks to be partitioned before they can be accessed. In this example, three 10Gig VMware virtual disks are to be used for the ASM storage. The following text shows the "/dev/sdb" disk being partitioned.

# ls sd*
sda  sda1  sda2  sdb  sdc  sdd
# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 1305.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):
Using default value 1305

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
#

The remaining disks ("/dev/sdc" and "/dev/sdd") must be partitioned in the same way.

ASMLib Installation

This step is only necessary if you want to use ASMLib to access the ASM disks.

Determine your kernel version using the following command as the root user.

# uname -r
2.6.9-34.ELsmp
#

Download the ASMLib software from the OTN website, making sure you pick the version that matches your distribution, kernel and architecture. For this example I used CentOS 4.3, so the following packages were required.

  • oracleasm-support-2.0.1-1.i386.rpm
  • oracleasmlib-2.0.1-1.i386.rpm
  • oracleasm-2.6.9-34.ELsmp-2.0.1-1.i686.rpm

 From Oracle Linux 6 onward, the oracleasm kernel driver is built into UEK, so it doesn't need to be installed separately.

Install the packages as the root user.

# rpm -Uvh oracleasm-support-2.0.1-1.i386.rpm \
           oracleasmlib-2.0.1-1.i386.rpm \
           oracleasm-2.6.9-34.ELsmp-2.0.1-1.i686.rpm
Preparing...                ########################################### [100%]
   1:oracleasm-support      ########################################### [ 33%]
   2:oracleasm-2.6.9-34.ELsm########################################### [ 67%]
   3:oracleasmlib           ########################################### [100%]
#

With the software installed, configure the ASM kernel module.

# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration:           [  OK  ]
Creating /dev/oracleasm mount point:                       [  OK  ]
Loading module "oracleasm":                                [  OK  ]
Mounting ASMlib driver filesystem:                         [  OK  ]
Scanning system for ASM disks:                             [  OK  ]
#

Once the kernel module is loaded, stamp (or label) the partitions created earlier as ASM disks.

# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk:                   [  OK  ]
# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
Marking disk "/dev/sdc1" as an ASM disk:                   [  OK  ]
# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1
Marking disk "/dev/sdd1" as an ASM disk:                   [  OK  ]
#

If this were a RAC installation, the disks would only be stamped by one node. The other nodes would just scan for the disks.

# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks:                             [  OK  ]
#

The stamped disks are listed as follows.

# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
#

The disks are now ready to be used by ASM.

Raw Device Setup

This step is only necessary if you want ASM to access the disks as raw devices.

Edit the "/etc/sysconfig/rawdevices" file, adding the following lines.

/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdc1
/dev/raw/raw3 /dev/sdd1

Restart the rawdevices service using the following command.

service rawdevices restart

Run the following commands and add them the "/etc/rc.local" file.

chown oracle:oinstall /dev/raw/raw1
chown oracle:oinstall /dev/raw/raw2
chown oracle:oinstall /dev/raw/raw3
chmod 600 /dev/raw/raw1
chmod 600 /dev/raw/raw2
chmod 600 /dev/raw/raw3

The ASM raw device disks are now configured.

ASM Creation

Creation of the ASM instance is the same, regardless of the use of ASMLib or raw devices. When using ASMLib, the candidate disks are listed using the stamp associated with them, while the raw devices are listed using their device name.

To configure an ASM instance, start the Database Configuration Assistant by issuing the "dbca" command as the oracle user. On the "Welcome" screen, click the "Next" button.

DBCA Welcome

Select the "Configure Automatic Storage Management" option, then click the "Next" Button.

DBCA Configure ASM

If the Oracle Cluster Syncronization Service (CSS) is not currently running, a warning screen will be displayed. Follow the instructions and click the "OK" button. Once you've returned to the previous screen, click the "Next" button again.

DBCA CSS Warning

The script gives the following output.

# /u01/app/oracle/product/10.2.0/db_1/bin/localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        centos2
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
#

Enter a password for the ASM instance, then click the "Next" button.

DBCA ASM Password

On the confirmation screen, click the "OK" button.

DBCA ASM Creation Confirm

Wait while the ASM instance is created.

DBCA ASM Creation

Once the ASM instance is created, you are presented with the "ASM Disk Groups" screen. Click the "Create New" button.

DBCA ASM Disk Groups

On the "Create Disk Group" screen, enter Disk Group Name of "DATA" and select the required level of redundancy:

  • External - ASM does not mirror the files. This option should only be used if your disks are already protected by some form of redundancy, like RAID.
  • Normal - ASM performs two-way mirroring of all files.
  • High - ASM performs three-way mirroring of all files.

In this example, the "High" redundancy is used. Select all three candidate disks and click the "OK" button. The following image shows how the candidate disks are displayed when using ASMLib.

DBCA Create Disk Group ASMLib

When using raw devices, the candidate discs are listed using the devide names.

DBCA Create Disk Group Raw Devices

On the "ASM Disk Groups" screen. Click the "Finish" button.

DBCA ASM Disk Groups

Click the "Yes" button to perform another operation.

DBCA Another Operation

You are now ready to create a database instance using ASM.

Database Creation

Before continuing with the database creation, check the listener is up and the ASM instance has registered with it. Start the listener using the following command.

$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-APR-2006 14:35:46

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener .log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos2.localdomain)(POR T=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                29-APR-2006 14:35:47
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listen er.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos2.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully
$

The ASM instance is not registered, so we can force the registration by doing the following.

$ export ORACLE_SID=+ASM
$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Apr 29 14:37:06 2006

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> alter system register;

System altered.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr oduction
With the Partitioning, OLAP and Data Mining options
$

Checking the status of the listener shows that the ASM instance is now registered.

$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-APR-2006 14:37:32

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                29-APR-2006 14:35:47
Uptime                    0 days 0 hr. 1 min. 46 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listen er.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos2.localdomain)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
  Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
$

Go back to the DBCA and create a custom database in the normal way, selecting the "Automatic Storage Management (ASM)" storage option.

DBCA ASM Storage Option

Enter the ASM password if prompted, then click the "OK" button.

DBCA ASM Password

Select the "DATA" disk group, then clicking the "Next" button.

DBCA ASM Disk Groups

Accept the default "Oracle-Managed Files" database location by clicking the "Next" button.

DBCA Database Location

Enable the "Flash Recovery Area" and Archiving, using the "+DATA" disk group for both.

DBCA Recovery Config

Continue with the rest of the DBCA, selecting the required options along the way.

Switching from Raw Devices to ASMLib

Shutdown any databases using the ASM instance, but leave the ASM instance itself running. Connect to the running ASM instance.

$ export ORACLE_SID=+ASM
$ sqlplus / as sysdba

Perform the ASMLib Installation, but stop prior to stamping the ASM disk. If you attempt to stamp the disks using the createdisk command it will fail.

Alter the ASM disk discovery string to exclude the raw devices used previously, then shutdown the ASM instance.

SQL> ALTER SYSTEM SET asm_diskstring = 'ORCL:VOL*' SCOPE=SPFILE;

System altered.

SQL> SHUTDOWN IMMEDIATE;
ASM diskgroups dismounted
ASM instance shutdown
SQL>

If you are planning to remove the raw device mappings (Raw Device Setup), you could simply reset the ASM_DISKGROUP parameter.

SQL> ALTER SYSTEM RESET asm_diskstring SCOPE=SPFILE SID='*';

System altered.

SQL>

At this point the disks will not be used by ASM because they are not stamped. As mentioned previously, the createdisk command used to stamp new disks would fail, so we must issue the renamedisk command as the root user for each disk.

# /etc/init.d/oracleasm renamedisk /dev/sdb1 VOL1
Renaming disk "/dev/sdb1" to "VOL1":                       [  OK  ]
# /etc/init.d/oracleasm renamedisk /dev/sdc1 VOL2
Renaming disk "/dev/sdc1" to "VOL2":                       [  OK  ]
# /etc/init.d/oracleasm renamedisk /dev/sdd1 VOL3
Renaming disk "/dev/sdd1" to "VOL3":                       [  OK  ]
#

Notice, the stamp matches the discovery string set earlier. The ASM instance can now be started.

SQL> STARTUP
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL>

The ASM instance is now using ASMLib, rather than raw devices. All dependent databases can now be started.

Switching from ASMLib to Raw Devices

Shutdown any databases using the ASM instance, but leave the ASM instance itself running. Connect to the running ASM instance.

$ export ORACLE_SID=+ASM
$ sqlplus / as sysdba

Alter the ASM disk discovery string to match the raw devices you plan to set up, then shutdown the ASM instance.

SQL> ALTER SYSTEM SET asm_diskstring = '/dev/raw/raw*' SCOPE=SPFILE;

System altered.

SQL> SHUTDOWN IMMEDIATE;
ASM diskgroups dismounted
ASM instance shutdown
SQL>

Perform all the steps listed in the Raw Device Setup, then start the ASM instance.

SQL> STARTUP
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL>

The ASM instance is now using the disks as raw devices, rather than as ASMLib disks. All dependent databases can now be started.

Performance Comparison

Some documents suggests using ASMLib with Oracle 10g Release 2 gives superior disk performance, while others say it only reduces the time searching for candidate disks, and hence ASM startup time. I decided to compare the performance of the two methods myself to see if I could tell the difference.

My first thought was to perform a simple insert/update/delete test, so I created the following user and schema for the test in a database using and ASM instance using ASMLib.

export ORACLE_SID=DB10G
sqlplus / as sysdba

CREATE TABLESPACE test_ts;

CREATE USER test_user IDENTIFIED BY test_user DEFAULT TABLESPACE test_ts QUOTA UNLIMITED ON test_ts;
GRANT CONNECT, CREATE TABLE TO test_user;

CONN test_user/test_user

CREATE TABLE test_tab (
  id    NUMBER,
  data  VARCHAR2(4000),
  CONSTRAINT test_tab_pk PRIMARY KEY (id)
);

Then, as the test user, I ran the following code several times and calculated an average time for each operation.

SET SERVEROUTPUT ON
DECLARE
  l_loops NUMBER := 1000;
  l_data  VARCHAR2(32767) := RPAD('X', 4000, 'X');
  l_start NUMBER;
BEGIN
  l_start := DBMS_UTILITY.get_time;

  FOR i IN 1 .. l_loops LOOP
    INSERT INTO test_tab (id, data) VALUES (i, l_data);
    COMMIT;
  END LOOP;

  DBMS_OUTPUT.put_line('Inserts (' || l_loops || '): ' || (DBMS_UTILITY.get_time - l_start) || ' hsecs');

  l_start := DBMS_UTILITY.get_time;

  FOR i IN 1 .. l_loops LOOP
    UPDATE test_tab
    SET    data = l_data
    WHERE  id   = i;
    COMMIT;
  END LOOP;

  DBMS_OUTPUT.put_line('Updates (' || l_loops || '): ' || (DBMS_UTILITY.get_time - l_start) || ' hsecs');

  l_start := DBMS_UTILITY.get_time;

  FOR i IN 1 .. l_loops LOOP
    DELETE FROM test_tab
    WHERE  id = i;
    COMMIT;
  END LOOP;

  DBMS_OUTPUT.put_line('Deletes (' || l_loops || '): ' || (DBMS_UTILITY.get_time - l_start) || ' hsecs');

  EXECUTE IMMEDIATE 'TRUNCATE TABLE test_tab';
END;
/

The code is purposely inefficient, using a single statement and a commit within a loop for each operation. Remember, the ASM instance is using high redundancy, so each physical write operation is effectively done 3 times.

Once the tests on ASMLib were complete, I switched to using raw devices and repeated the tests. The average results for 1000 of each operation are listed below.

Operation       ASMLib (hsecs)  Raw Devices (hsecs)
==============  ==============  ===================
Inserts (1000)             468                  852
Updates (1000)             956                 1287
Deletes (1000)            1281                 1995

You can instantly see that the ASMLib results are better than those of the raw devices, but the testing is suspect for the following reasons:

  • For each single run of the script, only 1000 operations of each type were performed. That equates to about 4M of data in the table when it is full. When you consider the use of the buffer cache, this is a pitiful amount of data. I originally intended to perform many more operations, but my disk was grinding so badly I thought better of it.
  • The tests were performed using VMware virtual disks, so really all this work was being done on a single SATA disk. I can't be sure if these results aren't just an artifact of the setup.
  • Although the average results look convincing, the raw data was so eratic I'm not convinced these results mean anything.

For these reasons, I decided not to continue to persue the performance tests, much to the delight of my hard drive. If I get access to a more realistic setup I will attempt some large scale tests and report the outcome.