Aplicar parche OneOff en Agente de Cloud

27 de Julio de 2023

Raúl Antonio Molina Alvarenga

#OracleACEAssociate

Si alguna vez se ven en la necesidad de aplicar un  Parche para una falla especifica (OneOff), o solventar un tema particular, aqui esta como deben realizarlo.

Parche  de correccion de auto inicio de agenter 12c (12.1.0.5)  en solaris  sparc

p21779343_121050_SOLARIS64.zip

 

Si el agente esta encendido , apagarlo

ORACLE_HOME  agentHOME/core/12.1.0.5.0  o su equivalente

export ORACLE_HOME=/export/home/oracle/agent12c/core/12.1.0.5.0

export PATH=$ORACLE_HOME/OPatch:$PATH

unzip p21779343_121050_SOLARIS64.zip

cd 21779343

opatch apply

luego, encender el agente.

#############

Espero les sea de Utilidad

Saludos

Inicio de la Historia

Noviembre 2020: Bienvenidos a este interesante Mundo de la Tecnología de Oracle Por aquí veremos tips, consejos, soluciones y toda clase de ayuda para ustedes, aceptando sugerencias de cualquier. Update Septimbre 2022:  Ahora soy Oracle ACE Associate Update Julio 2023: Continuo siendo Oracle ACE Associate   Update Julio 2024: Progreso o mejora, ACE Pro

Instalación Oracle Cloud Control 13c en Modo Silencioso

24 de Julio de 2023

Raúl Antonio Molina Alvarenga

#OracleACEAssociate

#Oracletipssv

Me pareció interesante publicar una entrada de articulo respecto a la instalación de un Cloud control completamente en modo silencioso o completamente desatendido.

Digo interesante porque, para mi lo es, dado que usualmente estamos acostumbrados a usar pantallas de un asistente que responden a nuestra interacción.

 

El Cloud Control  es una arquitectura de Software Empresaria muy robusta que permite al menos el monitoreo de otros componentes  Oracle, entre base de datos, Servidores de aplicaciones, Servidores físicos, Virtuales, un diagrama que presenta la solución:

Cloud Control Introduction

Usaremos Rutas estándar de producto, como por ejemplo el GI HOME:

/u01/app/19.0.0/grid

Algunas configuraciones no serán tomadas en detalle pues no es el foco del guion.

Configuraciones del Sistema Operativo

Limites

oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768
grid hard memlock 134217728
grid soft memlock 134217728

Lo escencial es configurar con el RPM de Preinstall RDBMS:

https://yum.oracle.com/repo/OracleLinux/OL8/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
Download el RPM del public :
http://public-yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm

GI

Y luego instalar el GI

./gridSetup.sh -silent -responseFile /u01/app/19.0.0/grid/install/response/gridsetup.rsp

Si se presenta problema hacer dicho workaround:

Solution

To solve INS-08101 ‘supportedOSCheck’, we trick OUI to think the operating system is release 7.8 by using an environment variable CV_ASSUME_DISTID, either temporarily or permanently.
1. Temporarily

At runtime, we can export the variable.
[oracle@ora19c dbhome_1]$ export CV_ASSUME_DISTID=OEL8.1

RDBMS

Una vez se ha configurado el GI, procedemos con el RDBMS:

./runInstaller -ignorePrereq -waitforcompletion -silent \
-responseFile /u01/app/oracle/product/19.0.0/db_1/install/response/db_install.rsp \
oracle.install.option=INSTALL_DB_SWONLY \
ORACLE_HOSTNAME=PLVORAGRID \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/u01/app/oraInventory \
SELECTED_LANGUAGES=en,en_GB \
ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1 \
ORACLE_BASE=/u02/app/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.OSDBA_GROUP=dba \
oracle.install.db.OSBACKUPDBA_GROUP=dba \
oracle.install.db.OSDGDBA_GROUP=dba \
oracle.install.db.OSKMDBA_GROUP=dba \
oracle.install.db.OSRACDBA_GROUP=dba \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
DECLINE_SECURITY_UPDATES=true

Creamos la BD que albergara el REPO del componente de OMR

dbca -silent -createDatabase \
-templateName General_Purpose.dbc \
-gdbname emcdb -sid emcdb -responseFile NO_VALUE \
-characterSet AL32UTF8 \
-sysPassword SysPassword1 \
-systemPassword SysPassword1 \
-createAsContainerDatabase true \
-numberOfPDBs 1 \
-pdbName emrep \
-pdbAdminPassword SysPassword1 \
-databaseType MULTIPURPOSE \
-memoryMgmtType auto_sga \
-totalMemory 2048 \
-storageType ASM \
-diskGroupName +DATA \
-redoLogFileSize 600 \
-emConfiguration NONE \
-ignorePreReqs

Aplicamos un RU en ambas capas

opatchauto apply /installMedia/32126842/32067171

 

Host:plvoragrid
SIHA Home:/u01/app/19.0.0/grid
Version:19.0.0.0.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /installMedia/32126842/32067171
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-02-09_13-44-06PM_1.log

 

OPatchauto session completed at Tue Feb 9 13:47:37 2021
Time taken to complete the session 6 minutes, 5 seconds
[root@PLVORAGRID 32067171]#

32067171;OJVM RELEASE UPDATE: 19.10.0.0.210119 (32067171)
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)

OPatch succeeded.


La configuración de la maquina quedaría así con el HAS:

crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE plvoragrid STABLE
ora.LISTENER.lsnr
ONLINE ONLINE plvoragrid STABLE
ora.asm
ONLINE ONLINE plvoragrid Started,STABLE
ora.ons
OFFLINE OFFLINE plvoragrid STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE plvoragrid STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.emcdb.db
1 ONLINE ONLINE plvoragrid Open,HOME=/u01/app/o
racle/product/19.0.0
/db_1,STABLE
ora.evmd
1 ONLINE ONLINE plvoragrid STABLE
--------------------------------------------------------------------------------
[grid@PLVORAGRID ~]$ asmcmd lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 4194304 307188 301880 0 301880 0 N DATA/

 

A la base de datos, hay que ajustarle algunas configuraciones :

alter system set db_create_file_dest='${DATA_DIR}';
alter pluggable database ${PDB_NAME} save state;

-- Recommended minimum settings.
alter system set "_allow_insert_with_update_check"=true scope=both;
alter system set session_cached_cursors=200 scope=spfile;

-- Recommended: processes=600
alter system set processes=600 scope=spfile;

-- Recommended: pga_aggregate_target=1G
alter system set pga_aggregate_target=450M scope=spfile;

-- Recommended: sga_target=3G
alter system set sga_target=800M scope=spfile;

-- Recommended: shared_pool_size=600M
--alter system set shared_pool_size=600M scope=spfile;

-- For 12.1.0.2 set the following.
--alter system set optimizer_adaptive_features=false scope=both;

-- Should not be needed for 19c, but installer fails without them.
alter system set "_optimizer_nlj_hj_adaptive_join"= FALSE scope=both sid='*';
alter system set "_optimizer_strans_adaptive_pruning" = FALSE scope=both sid='*';
alter system set "_px_adaptive_dist_method" = OFF scope=both sid='*';
alter system set "_sql_plan_directive_mgmt_control" = 0 scope=both sid='*';
alter system set "_optimizer_dsdir_usage_control" = 0 scope=both sid='*';
alter system set "_optimizer_use_feedback" = FALSE scope=both sid='*';
alter system set "_optimizer_gather_feedback" = FALSE scope=both sid='*';
alter system set "_optimizer_performance_feedback" = OFF scope=both sid='*';

SHUTDOWN IMMEDIATE;
STARTUP;

 

Instalación del Cloud Control

Parametros para response file de Cloud Control

# Set parameters.
ORACLE_BASE=/u02/app/oracle
UNIX_GROUP_NAME=oinstall
ORA_INVENTORY=/u01/app/oraInventory
MW_HOME=/u01/app/oracle/middleware
ORACLE_HOSTNAME=${HOSTNAME}
AGENT_BASE=/u01/app/oracle/agent
WLS_USERNAME=weblogic
WLS_PASSWORD=Welcome1
GC_INST=${ORACLE_BASE}/gc_inst
SOFTWARE_LIBRARY=/u02/app/oracle/swlib
DATABASE_HOSTNAME=${HOSTNAME}
LISTENER_PORT=1521
PDB_NAME=emrep
SYS_PASSWORD=SysPassword1
AGENT_PASSWORD=${WLS_PASSWORD}
ORACLE_SID=emcdb
DATA_DIR=+DATA
OMS_HOME=${MW_HOME}
SYSMAN_PASSWORD=${WLS_PASSWORD}
SOFTWARE_DIR=/installMedia/
cat > /tmp/install.rsp <<EOF
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME=${UNIX_GROUP_NAME}
INVENTORY_LOCATION=${ORA_INVENTORY}
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
INSTALL_UPDATES_SELECTION=skip
ORACLE_MIDDLEWARE_HOME_LOCATION=${MW_HOME}
ORACLE_HOSTNAME=${ORACLE_HOSTNAME}
AGENT_BASE_DIR=${AGENT_BASE}
WLS_ADMIN_SERVER_USERNAME=${WLS_USERNAME}
WLS_ADMIN_SERVER_PASSWORD=${WLS_PASSWORD}
WLS_ADMIN_SERVER_CONFIRM_PASSWORD=${WLS_PASSWORD}
NODE_MANAGER_PASSWORD=${WLS_PASSWORD}
NODE_MANAGER_CONFIRM_PASSWORD=${WLS_PASSWORD}
ORACLE_INSTANCE_HOME_LOCATION=${GC_INST}
CONFIGURE_ORACLE_SOFTWARE_LIBRARY=true
SOFTWARE_LIBRARY_LOCATION=${SOFTWARE_LIBRARY}
DATABASE_HOSTNAME=${DATABASE_HOSTNAME}
LISTENER_PORT=${LISTENER_PORT}
SERVICENAME_OR_SID=${PDB_NAME}
SYS_PASSWORD=${SYS_PASSWORD}
SYSMAN_PASSWORD=${SYSMAN_PASSWORD}
SYSMAN_CONFIRM_PASSWORD=${SYSMAN_PASSWORD}
DEPLOYMENT_SIZE=SMALL
AGENT_REGISTRATION_PASSWORD=${AGENT_PASSWORD}
AGENT_REGISTRATION_CONFIRM_PASSWORD=${AGENT_PASSWORD}
PLUGIN_SELECTION={}
b_upgrade=false
EM_INSTALL_TYPE=NOSEED
CONFIGURATION_TYPE=LATER
CONFIGURE_SHARED_LOCATION_BIP=false
MANAGEMENT_TABLESPACE_LOCATION=${DATA_DIR}/${ORACLE_SID^^}/${PDB_NAME}/mgmt.dbf
CONFIGURATION_DATA_TABLESPACE_LOCATION=${DATA_DIR}/${ORACLE_SID^^}/${PDB_NAME}/mgmt_ecm_depot1.dbf
JVM_DIAGNOSTICS_TABLESPACE_LOCATION=${DATA_DIR}/${ORACLE_SID^^}/${PDB_NAME}/mgmt_deepdive.dbf
EOF

Lanzamos el instalador para que despliegue el Software completo, mas no realizara configuración, prefiero que se haga así , por si hay algún error podemos corregirlo, no esta de mas que indique que si se puede realizar un backup de BD  (o un punto de restauración con garantía)  que permita revertir la BD completa a un punto en el tiempo, seria prudente.

./em13400_linux64.bin -silent -responseFile /tmp/install.rsp -J-Djava.io.tmpdir=/u02/tmp/

Una vez el instalador termine, podemos lanzar otro punto de control o reversion de estado de la BD completa, y lanzar el asistente de configuracion del Cloud Control 13c.

 

Al final adjunto los logs de ambos procesos.

cat > /tmp/config.rsp <<EOF
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME=${UNIX_GROUP_NAME}
INVENTORY_LOCATION=${ORA_INVENTORY}
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
INSTALL_UPDATES_SELECTION=skip
ORACLE_MIDDLEWARE_HOME_LOCATION=${MW_HOME}
ORACLE_HOSTNAME=${ORACLE_HOSTNAME}
AGENT_BASE_DIR=${AGENT_BASE}
WLS_ADMIN_SERVER_USERNAME=${WLS_USERNAME}
WLS_ADMIN_SERVER_PASSWORD=${WLS_PASSWORD}
WLS_ADMIN_SERVER_CONFIRM_PASSWORD=${WLS_PASSWORD}
NODE_MANAGER_PASSWORD=${WLS_PASSWORD}
NODE_MANAGER_CONFIRM_PASSWORD=${WLS_PASSWORD}
ORACLE_INSTANCE_HOME_LOCATION=${GC_INST}
CONFIGURE_ORACLE_SOFTWARE_LIBRARY=true
SOFTWARE_LIBRARY_LOCATION=${SOFTWARE_LIBRARY}
DATABASE_HOSTNAME=${DATABASE_HOSTNAME}
LISTENER_PORT=${LISTENER_PORT}
SERVICENAME_OR_SID=${PDB_NAME}
SYS_PASSWORD=${SYS_PASSWORD}
SYSMAN_PASSWORD=${SYSMAN_PASSWORD}
SYSMAN_CONFIRM_PASSWORD=${SYSMAN_PASSWORD}
DEPLOYMENT_SIZE=SMALL
AGENT_REGISTRATION_PASSWORD=${AGENT_PASSWORD}
AGENT_REGISTRATION_CONFIRM_PASSWORD=${AGENT_PASSWORD}
PLUGIN_SELECTION={}
b_upgrade=false
EM_INSTALL_TYPE=NOSEED
CONFIGURATION_TYPE=ADVANCED
CONFIGURE_SHARED_LOCATION_BIP=false
MANAGEMENT_TABLESPACE_LOCATION=${DATA_DIR}/${ORACLE_SID^^}/${PDB_NAME}/mgmt.dbf
CONFIGURATION_DATA_TABLESPACE_LOCATION=${DATA_DIR}/${ORACLE_SID^^}/${PDB_NAME}/mgmt_ecm_depot1.dbf
JVM_DIAGNOSTICS_TABLESPACE_LOCATION=${DATA_DIR}/${ORACLE_SID^^}/${PDB_NAME}/mgmt_deepdive.dbf
EOF





./sysman/install/ConfigureGC.sh -silent -responseFile /tmp/config.rsp

Al finalizar, tendremos un producto Cloud Control 13c correctamente instalado.

Espero les sea de Utilidad.

Saludos

Logs

Launcher log file is /tmp/OraInstall2021-02-09_05-15-05PM/launcher2021-02-09_05-15-05PM.log.
Extracting the installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done
Checking swap space: must be greater than 512 MB. Actual 16383 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2021-02-09_05-15-05PM
====Prereq Config Location main===
/tmp/OraInstall2021-02-09_05-15-05PM/stage/prereq
EMGCInstaller args -scratchPath
EMGCInstaller args /tmp/OraInstall2021-02-09_05-15-05PM
EMGCInstaller args -sourceType
EMGCInstaller args network
EMGCInstaller args -timestamp
EMGCInstaller args 2021-02-09_05-15-05PM
EMGCInstaller args -paramFile
EMGCInstaller args /tmp/sfx_okyBMq/Disk1/install/linux64/oraparam.ini
EMGCInstaller args -silent
EMGCInstaller args -responseFile
EMGCInstaller args /tmp/install.rsp
EMGCInstaller args -nocleanUpOnExit
DiskLoc inside SourceLoc/tmp
EMFileLoc:/tmp/OraInstall2021-02-09_05-15-05PM/oui/em/
ScratchPathValue :/tmp/OraInstall2021-02-09_05-15-05PM
EMGCInstallUpdatesInfoOnNext:: calling actionOnClickofNext
Now in EMGCInstallUpdatesInfoOnNext.actionsOnClickofNext
EMGCInstallUpdatesInfoOnNext:: End of actionOnClickofNext
Some recommended prerequisites checks failed. You might encounter errors during installation. Fix those prerequisites and start the installation again.
Unable to copy the logs to the permanent location: The permanent log directory is unknown (null)..

The log(s) can be found here: /tmp/OraInstall2021-02-09_05-15-05PM.
<eFile /tmp/install.rsp -J-Djava.io.tmpdir=/u02/tmp/
ERROR: Cannot create the extract directory in /u02/tmp (Permission denied).
ERROR: Cannot setup the extract directory /u02/tmp/sfx_kOG195 (-1).
<eFile /tmp/install.rsp -J-Djava.io.tmpdir=/u02/tmp/
Launcher log file is /u02/tmp/OraInstall2021-02-09_05-18-26PM/launcher2021-02-09_05-18-26PM.log.
Extracting the installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done
Checking swap space: must be greater than 512 MB. Actual 16383 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Preparing to launch the Oracle Universal Installer from /u02/tmp/OraInstall2021-02-09_05-18-26PM
====Prereq Config Location main===
/u02/tmp/OraInstall2021-02-09_05-18-26PM/stage/prereq
EMGCInstaller args -scratchPath
EMGCInstaller args /u02/tmp/OraInstall2021-02-09_05-18-26PM
EMGCInstaller args -sourceType
EMGCInstaller args network
EMGCInstaller args -timestamp
EMGCInstaller args 2021-02-09_05-18-26PM
EMGCInstaller args -paramFile
EMGCInstaller args /u02/tmp/sfx_vCLaNi/Disk1/install/linux64/oraparam.ini
EMGCInstaller args -silent
EMGCInstaller args -responseFile
EMGCInstaller args /tmp/install.rsp
EMGCInstaller args -nocleanUpOnExit
DiskLoc inside SourceLoc/u02/tmp
EMFileLoc:/u02/tmp/OraInstall2021-02-09_05-18-26PM/oui/em/
ScratchPathValue :/u02/tmp/OraInstall2021-02-09_05-18-26PM
EMGCInstallUpdatesInfoOnNext:: calling actionOnClickofNext
Now in EMGCInstallUpdatesInfoOnNext.actionsOnClickofNext
EMGCInstallUpdatesInfoOnNext:: End of actionOnClickofNext
The installer detected the host name as PLVORAGRID, but you have changed it to PLVORAGRID
Session log file is /u02/tmp/OraInstall2021-02-09_05-18-26PM/install2021-02-09_05-18-26PM.log
Installation in progress

Install successful
Linking in progress

Link successful
Setup in progress

Setup successful
Session log file is /u02/tmp/OraInstall2021-02-09_05-18-26PM/install2021-02-09_05-18-26PM.log
Installation in progress

Install successful
Linking in progress

Link successful
Setup in progress

Setup successful
Agent OracleHome :/u01/app/oracle/agent/agent_13.4.0.0.0
OMS OracleHome :/u01/app/oracle/middleware

13NGCHEKAGGREGATE : oracle.sysman.top.agent
13NGCHEKAGGREGATE : OuiConfigVariables
13NGCHEKAGGREGATE : oracle.sysman.top.oms
13NGCHEKAGGREGATE : encap_oms
13NGCHEKAGGREGATE : OuiConfigVariables
Prompt for the allroot.sh

Warning: You must run the following configuration scripts as the "root" user.
/u01/app/oracle/middleware/allroot.sh
To execute the configuration scripts:
1. Open a new terminal window.
2. Login in as "root".
3. Run the scripts.

Successfully installed Enterprise Manager Cloud Control.
Logs successfully copied to /u01/app/oraInventory/logs.


[oracle@PLVORAGRID installMedia]$
[oracle@PLVORAGRID installMedia]$

 

4 2021-02-10 08:48:19 history
<onfigureGC.sh -silent -responseFile /tmp/config.rsp
====Prereq Config Location main===
null
EMGCInstaller args -onlyconfig
EMGCInstaller args -oh
EMGCInstaller args /u01/app/oracle/middleware
EMGCInstaller args -scratchPath
EMGCInstaller args /u01/app/oracle/middleware
EMGCInstaller args -sourceLoc
EMGCInstaller args /u01/app/oracle/middleware
EMGCInstaller args INSTALL_SWONLY_WITH_PLUGINS=false
EMGCInstaller args -silent
EMGCInstaller args -responseFile
EMGCInstaller args /tmp/config.rsp
DiskLoc inside SourceLoc/u01/app/
EMFileLoc:/u01/app/oracle/middleware/oui/em/
ScratchPathValue :/u01/app/oracle/middleware
Error Messages:
----------------------------------------------------
* Invalid option(s): sourceLoc
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
List file is unreadable
Oracle strongly recommends using the AL32UTF8 character set for EM repository. AL32UTF8 is Oracle's name for the standard Unicode encoding UTF-8, which enables universal support of virtually all languages of the world.

The following prerequisite check failed because the Oracle Database, where the Management Repository will be configured, does not meet the configuration requirements. These failures do not impact the installation, but you may encounter performance issues with the product later. You can either click Cancel, fix the issue manually now, based on the recommendation offered for this prerequisite, and click Next, or you can click OK to fix it after the installation ends. For more details check the logs: /u01/app/oracle/middleware/cfgtoollogs/oui/emdbprereqs
Prereq Name Recommendation
Check the pga_aggregate_target instance parameter value. The pga_aggregate_target instance parameter should be set to at least 1000000000 bytes.
Check the sga_target instance parameter value. The sga_target instance parameter should be set to at least 3000000000 bytes.
Check the shared_pool_size instance parameter value. The shared_pool_size instance parameter should be set to at least 600000000 bytes or roughly one third of the sga_target size.
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

..................................................................................................
Installation in progress (Wednesday, February 10, 2021 8:48:42 AM PET)
98% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:48:43 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:48:43 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:48:43 AM PET)

Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:48:54 AM PET)
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

............................................................... 18% Done.
............................................................... 37% Done.
............................................................... 56% Done.
............................................................... 75% Done.
............................................................... 94% Done.
...............
Installation in progress (Wednesday, February 10, 2021 8:49:15 AM PET)
98% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:49:15 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:49:15 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:49:15 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:49:25 AM PET)
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

..................................................................................................
Installation in progress (Wednesday, February 10, 2021 8:49:34 AM PET)
98% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:49:35 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:49:35 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:49:35 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:49:44 AM PET)
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

............................................................... 23% Done.
............................................................... 46% Done.
............................................................... 70% Done.
............................................................... 93% Done.
...............
Installation in progress (Wednesday, February 10, 2021 8:50:03 AM PET)
98% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:50:03 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:50:03 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:50:03 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:50:13 AM PET)
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

..................................................................................................................
Installation in progress (Wednesday, February 10, 2021 8:50:30 AM PET)
98% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:50:31 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:50:31 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:50:31 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:50:40 AM PET)
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.emas/13.4.1.0.0/oracle.sysman.emas.agent.plugin-13.4.1.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

..................................................................................................
Installation in progress (Wednesday, February 10, 2021 8:50:46 AM PET)
98% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:50:46 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:50:46 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:50:46 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:50:57 AM PET)
List file is unreadable
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.emrep/13.4.0.0.0/oracle.sysman.emrep.agent.plugin-13.4.0.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

.......................................................................................
Installation in progress (Wednesday, February 10, 2021 8:50:59 AM PET)
87% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:50:59 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:50:59 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:50:59 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:51:10 AM PET)
List file is unreadable
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.beacon/13.4.0.0.0/oracle.sysman.beacon.agent.plugin-13.4.0.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

..................................................................................................
Installation in progress (Wednesday, February 10, 2021 8:51:13 AM PET)
98% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:51:13 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:51:13 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:51:13 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:51:24 AM PET)
List file is unreadable
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.oh/13.4.0.0.0/oracle.sysman.oh.agent.plugin-13.4.0.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

.................................................................................................
Installation in progress (Wednesday, February 10, 2021 8:51:26 AM PET)
97% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:51:26 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:51:26 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:51:26 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:51:37 AM PET)
List file is unreadable
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.csa/13.4.0.0.0/oracle.sysman.csa.agent.plugin-13.4.0.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

.......................................................................
Installation in progress (Wednesday, February 10, 2021 8:51:38 AM PET)
71% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:51:38 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:51:38 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:51:38 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:51:49 AM PET)
List file is unreadable
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.csa/13.4.0.0.0/oracle.sysman.csa.discovery.plugin-13.4.0.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

..............................................................................................
Installation in progress (Wednesday, February 10, 2021 8:51:51 AM PET)
93% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:51:51 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:51:51 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:51:51 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:52:02 AM PET)
List file is unreadable
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.oh/13.4.0.0.0/oracle.sysman.oh.discovery.plugin-13.4.0.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

..........................................................................
Installation in progress (Wednesday, February 10, 2021 8:52:04 AM PET)
74% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:52:04 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:52:04 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:52:04 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:52:14 AM PET)
List file is unreadable
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.db/13.4.1.0.0/oracle.sysman.db.discovery.plugin-13.4.1.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

............................................................................................
Installation in progress (Wednesday, February 10, 2021 8:52:16 AM PET)
92% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:52:16 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:52:16 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:52:16 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:52:27 AM PET)
List file is unreadable
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.xa/13.4.1.0.0/oracle.sysman.xa.discovery.plugin-13.4.1.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

.....................................................................................
Installation in progress (Wednesday, February 10, 2021 8:52:29 AM PET)
85% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:52:29 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:52:29 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:52:29 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:52:40 AM PET)
List file is unreadable
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.emas/13.4.1.0.0/oracle.sysman.emas.discovery.plugin-13.4.1.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

..................................................................................................
Installation in progress (Wednesday, February 10, 2021 8:52:42 AM PET)
98% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:52:42 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:52:42 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:52:42 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:52:53 AM PET)
List file is unreadable
List file is unreadable
&Decline License Agreement/u01/app/oracle/middleware/sysman/install/plugins/oracle.sysman.si/13.4.1.0.0/oracle.sysman.si.discovery.plugin-13.4.1.0.0.farb
Session log file is /tmp/OraInstall2021-02-10_08-48-30AM/nextgen2021-02-10_08-48-30AM.log

............................................................................
Installation in progress (Wednesday, February 10, 2021 8:52:54 AM PET)
76% Done.
Install successful

Linking in progress (Wednesday, February 10, 2021 8:52:54 AM PET)
Link successful

Setup in progress (Wednesday, February 10, 2021 8:52:54 AM PET)
Setup successful

Saving inventory (Wednesday, February 10, 2021 8:52:54 AM PET)
Saving inventory complete

End of install phases.(Wednesday, February 10, 2021 8:53:06 AM PET)
List file is unreadable
13NGCHEKAGGREGATE : oracle.sysman.top.agent
13NGCHEKAGGREGATE : OuiConfigVariables
13NGCHEKAGGREGATE : oracle.sysman.top.oms
13NGCHEKAGGREGATE : encap_oms
13NGCHEKAGGREGATE : OuiConfigVariables
2021-02-10_08-53-09AM: Configuration Assistant "Plugins Prerequisites Check" is in progress.

2021-02-10_08-53-17AM: Configuration Assistant "Plugins Prerequisites Check" has Succeeded.

2021-02-10_08-53-17AM: Configuration Assistant "Repository Configuration" is in progress.

Setting the value of EMPREREQKIT_RESULTDIR /u01/app/oracle/middleware/.gcinstall_temp
Calling the EMSCHEMA MANAGER: CREATE

Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites
Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.




Check the Repository Configuration Assistant logs at: /u01/app/oracle/middleware/sysman/log/schemamanager










TNS Test Inserted Successfully
Successfully Added TNS Query Descriptors

******** ORACLE_HOME is /u01/app/oracle/middleware
test properties path: /u01/app/oracle/middleware/sysman/admin/emdrep/prop/imap.properties
CreateTestType:createCompleteTest: BEGIN
CreateTestType:createTestMetadataObject: BEGIN
CreateTestType:createTestMetadataObject: END
CreateTestType:createPropertyGroups: BEGIN
CreateTestType:createPropertyGroups: END
CreateTestType:createStrayProperties: BEGIN
CreateTestType:createStrayProperties: END
CreateTestType:createDefaultPromotions: BEGIN
CreateTestType:createDefaultPromotions: END
CreateTestType:createDefaultThresholds: BEGIN
CreateTestType:createDefaultThresholds: END
CreateTestType:createMetrics4TestType: BEGIN
CreateTestType:createMetrics4TestType: END
PropertyName :imap_host
PropertyName :imap_port
PropertyName :imap_user_name
PropertyName :imap_password
PropertyName :numretries
PropertyName :retryinterval
CreateTestType:createQueryDescriptor: BEGIN
CreateTestType:createQueryDescriptor: END
Enabled test for: IMAP , generic_service , 1.0
Enabled test for: IMAP , aggregate_service , 1.0
CreateTestType:createCompleteTest: END
******** ORACLE_HOME is /u01/app/oracle/middleware




Wed Feb 10 09:41:17.353 PET 2021 rcu:Extracted SQL Statement: [BEGIN
DECLARE
l_core_ver MGMT_VERSIONS.version%TYPE;
l_error VARCHAR2(100) ;
l_error_count NUMBER := 0 ;
l_database_role VARCHAR2(32);
BEGIN
-- Check to see if this database is in logical standby mode. If it is
-- we need to exit this script because logical standby doesn't support
-- DBMS_JOBS.
BEGIN
SELECT database_role into l_database_role
from v$database where database_role like '%LOGICAL%';
RETURN;
-- Exit this script if this is a logical standby db.
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
-- Just continue normally if this is not a logical standby db.
END;

BEGIN
SELECT version INTO l_core_ver
FROM MGMT_VERSIONS
WHERE component_name = 'CORE';
EXCEPTION
WHEN OTHERS THEN
l_core_ver := '4.0.0.0.0';
END;

IF (l_core_ver = '4.0.0.0.0') THEN

-- For 4.0.0 repository, the maintenance package
-- does not have the remove_em_dbms_jobs function, so
-- have to remove the jobs created in 4.0.0
SAVEPOINT admin_remove_jobs_start ;
FOR crec IN (select job, what FROM user_jobs
where what in (
'EM_SLM_COMPUTATION.EXEC_SLM_COMPUTATION_JOB();',
'EM_SLM_CALENDAR.UPDATE_CALENDAR();',
'MGMT_GENSVC_AVAIL.EXEC_AVAIL_JOB();',
'EMD_COLLECTION.RUN_COLLECTIONS();',
'EMD_EVALUATION.EVALSQLMETRICS();',
'EMD_LOADER.ROLLUP();',
'EMD_NOTIFICATION.DELIVER_NOTIFICATIONS();',
'EM_PING.MARK_NODE_STATUS();',
'MGMT_JOB_ENGINE.apply_purge_policies();'
)
or what like 'emd_maintenance.analyze_emd_schema%'
)
LOOP
BEGIN
DBMS_JOB.REMOVE(crec.job);
EXCEPTION
WHEN OTHERS THEN
l_error_count := l_error_count + 1 ;
IF l_error IS NULL
THEN
l_error := SUBSTR(SQLERRM,1,100) ;
END IF ;
END;
END LOOP;
IF l_error_count > 0
THEN
ROLLBACK TO SAVEPOINT admin_remove_jobs_start ;
raise_application_error(MGMT_GLOBAL.UNEXPECTED_ERR,
l_error_count||' error(s) when dropping dbms_jobs '||
',first error='||l_error) ;
END IF ;
ELSE

-- This is done as dynamic SQL, so that this can be run against
-- EM 4.0.0 repositories also
EXECUTE IMMEDIATE 'begin EMD_MAINTENANCE.REMOVE_EM_DBMS_JOBS; end;';

END IF;

END;
END;
]
Wed Feb 10 09:41:17.353 PET 2021 rcu:Extracted Statement from File Name: '/u01/app/oracle/middleware/sysman/admin/emdrep/sql/core/latest/admin/admin_remove_dbms_jobs.sql'Line Number: 111
Wed Feb 10 09:41:17.353 PET 2021 rcu:Statement Type: 'BEGIN/END Anonymous Block'
Wed Feb 10 09:41:17.751 PET 2021 rcu:Extracted SQL Statement: [PROMPT Submitting DBMS jobs.]
Wed Feb 10 09:41:17.751 PET 2021 rcu:Extracted Statement from File Name: '/u01/app/oracle/middleware/sysman/admin/emdrep/sql/core/latest/admin/admin_submit_dbms_jobs.sql'Line Number: 29
Wed Feb 10 09:41:17.751 PET 2021 rcu:Statement Type: 'Debug Statement'
Wed Feb 10 09:41:17.751 PET 2021 rcu:Extracted SQL Statement: [DECLARE
l_database_role VARCHAR2(32);
BEGIN
-- Check to see if this database is in logical standby mode. If it is
-- we need to exit this script because logical standby doesn't support
-- DBMS_JOBS.
BEGIN
SELECT database_role into l_database_role
from v$database where database_role like '%LOGICAL%';
EXCEPTION
WHEN NO_DATA_FOUND THEN
EMD_MAINTENANCE.SUBMIT_EM_DBMS_JOBS;
COMMIT;
END;
END;
]
Wed Feb 10 09:41:17.751 PET 2021 rcu:Extracted Statement from File Name: '/u01/app/oracle/middleware/sysman/admin/emdrep/sql/core/latest/admin/admin_submit_dbms_jobs.sql'Line Number: 46
Wed Feb 10 09:41:17.751 PET 2021 rcu:Statement Type: 'BEGIN/END Anonymous Block'

Repository Creation Utility: Create - Completion Summary

Database details:
-----------------------------
Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=PLVORAGRID)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=emrep)))
Connected As : SYS
RCU Logfile : No log file specified

Component schemas created:
-----------------------------
Component Status Logfile

EM Repository Creation Configuration Success /u01/app/oracle/middleware/sysman/log/schemamanager/m_021021_0853_AM/m_021021_0853_AM.CREATE/RCU2021-02-10_08-53_876334194/logs/em_repos_config.log
EM Repository Init Configuration Success /u01/app/oracle/middleware/sysman/log/schemamanager/m_021021_0853_AM/m_021021_0853_AM.CREATE/RCU2021-02-10_08-53_876334194/logs/em_repos_init.log
EM Repository Common Success /u01/app/oracle/middleware/sysman/log/schemamanager/m_021021_0853_AM/m_021021_0853_AM.CREATE/RCU2021-02-10_08-53_876334194/logs/em_repos_common.log

Repository Creation Utility - Create : Operation Completed
The creation of Repository is completed now running the MOS

2021-02-10_09-41-51AM: Configuration Assistant "Repository Configuration" has Succeeded.

2021-02-10_09-41-51AM: Configuration Assistant "MDS Schema Configuration" is in progress.

Setting the value of EMPREREQKIT_RESULTDIR /u01/app/oracle/middleware/.gcinstall_temp
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites
Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.
Percent Complete: 30
Percent Complete: 65
Percent Complete: 65
Percent Complete: 70
Percent Complete: 70
Percent Complete: 75
Percent Complete: 75
Percent Complete: 95
Percent Complete: 100

Repository Creation Utility: Create - Completion Summary

Database details:
-----------------------------
Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=PLVORAGRID)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=emrep)))
Connected As : SYS
Prefix for (prefixable) Schema Owners : SYSMAN
RCU Logfile : No log file specified

Component schemas created:
-----------------------------
Component Status Logfile

Metadata Services Success /u01/app/oracle/middleware/sysman/log/schemamanager/m_021021_0853_AM/m_021021_0853_AM.CREATE/RCU2021-02-10_09-41_996616159/logs/mds.log

Repository Creation Utility - Create : Operation Completed
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites
Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.
Percent Complete: 50
Percent Complete: 55
Percent Complete: 65
Percent Complete: 65
Percent Complete: 80
Percent Complete: 90
Percent Complete: 95
Percent Complete: 95
Percent Complete: 97
Percent Complete: 100

Repository Creation Utility: Create - Completion Summary

Database details:
-----------------------------
Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=PLVORAGRID)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=emrep)))
Connected As : SYS
Prefix for (prefixable) Schema Owners : SYSMAN122130
RCU Logfile : No log file specified

Component schemas created:
-----------------------------
Component Status Logfile

Oracle Platform Security Services Success /u01/app/oracle/middleware/sysman/log/schemamanager/m_021021_0853_AM/m_021021_0853_AM.CREATE/RCU2021-02-10_09-41_996616159/logs/opss.log

Repository Creation Utility - Create : Operation Completed
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites
Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.
Percent Complete: 50
Percent Complete: 50
Percent Complete: 55
Percent Complete: 60
Percent Complete: 65
Percent Complete: 65
Percent Complete: 65
Percent Complete: 82
Percent Complete: 100

Repository Creation Utility: Create - Completion Summary

Database details:
-----------------------------
Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=PLVORAGRID)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=emrep)))
Connected As : SYS
Prefix for (prefixable) Schema Owners : SYSMAN
RCU Logfile : No log file specified

Component schemas created:
-----------------------------
Component Status Logfile

Common Infrastructure Services Success /u01/app/oracle/middleware/sysman/log/schemamanager/m_021021_0853_AM/m_021021_0853_AM.CREATE/RCU2021-02-10_09-41_996616159/logs/stb.log

Repository Creation Utility - Create : Operation Completed
2021-02-10_09-42-02AM: Configuration Assistant "MDS Schema Configuration" has Succeeded.

2021-02-10_09-42-02AM: Configuration Assistant "BI Publisher Schema Configuration" is in progress.

Setting the value of EMPREREQKIT_RESULTDIR /u01/app/oracle/middleware/.gcinstall_temp
Middleware home/u01/app/oracle/middleware
2021_02_10_AD_09_42_02_PET BIPLATFORM EMSchemaManagerHelper: Info : Oracle Home is /u01/app/oracle/middleware
2021_02_10_AD_09_42_02_PET BIPLATFORM EMSchemaManagerHelper: Info : Schema Oracle Home is /u01/app/oracle/middleware/bi
2021_02_10_AD_09_42_02_PET BIPLATFORM EMSchemaManagerHelper: Info : Setting RCU_HOME to /u01/app/oracle/middleware/oracle_common
2021_02_10_AD_09_42_02_PET BIPLATFORM EMSchemaManagerHelper: Info : Setting SCRIPT_HOME to /u01/app/oracle/middleware/oracle_common/common/sql
2021_02_10_AD_09_42_02_PET BIPLATFORM EMSchemaManagerHelper: Info : Setting RCU_LOG_LOCATION to /u01/app/oracle/middleware/cfgtoollogs/bip
2021_02_10_AD_09_42_02_PET BIPLATFORM EMSchemaManagerHelper: Info : Setting RCU_LOG_NAME to emBIPLATFORM.log
2021_02_10_AD_09_42_02_PET BIPLATFORM version is null
2021_02_10_AD_09_42_02_PET has BIPLATFORM user? false
2021_02_10_AD_09_42_02_PET BIPLATFORM EMSchemaManagerHelper: Info : Prepare to initialize RCU
2021_02_10_AD_09_42_02_PET BIPLATFORM EMSchemaManagerHelper: Info : RCU initialized with parameters : -silent -createRepository -compInfoXMLLocation /u01/app/oracle/middleware/sysman/emdrep/config/schemaext/ComponentInfo.xml -storageXMLLocation /u01/app/oracle/middleware/sysman/emdrep/config/schemaext/Storage.xml -connectString (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=PLVORAGRID)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=emrep))) -dbUser SYS -dbRole sysdba -schemaPrefix SYSMAN -component BIPLATFORM
2021_02_10_AD_09_42_02_PET BIPLATFORM EMSchemaManagerHelper: Info : Invoking RCU
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites
Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.
Percent Complete: 50
Percent Complete: 50
Percent Complete: 55
Percent Complete: 55
Percent Complete: 65
Percent Complete: 77
Percent Complete: 88
Percent Complete: 94
Percent Complete: 97
Percent Complete: 98
Percent Complete: 99
Percent Complete: 99
Percent Complete: 99
Percent Complete: 99
Percent Complete: 99
Percent Complete: 99
Percent Complete: 99
Percent Complete: 99
Percent Complete: 99
Percent Complete: 99
Percent Complete: 99
Percent Complete: 99
Percent Complete: 100

Repository Creation Utility: Create - Completion Summary

Database details:
-----------------------------
Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=PLVORAGRID)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=emrep)))
Connected As : SYS
Prefix for (prefixable) Schema Owners : SYSMAN
RCU Logfile : No log file specified

Component schemas created:
-----------------------------
Component Status Logfile

Business Intelligence Platform Success /u01/app/oracle/middleware/sysman/log/schemamanager/m_021021_0853_AM/m_021021_0853_AM.CREATE/RCU2021-02-10_09-42_1064729917/logs/biplatform.log

Repository Creation Utility - Create : Operation Completed
2021_02_10_AD_09_42_07_PET BIPLATFORM EMSchemaManagerHelper: Info : RCU Completed : COMPLETED
2021_02_10_AD_09_42_07_PET BIPLATFORM EMSchemaManagerHelper: Info : Asscociating profile
Unable to create logger...
2021_02_10_AD_09_42_07_PET BIPLATFORM EMSchemaManagerHelper: Info : profile associated
Successfully created SYSMAN_BIPLATFORM schema...
Recompiling Required BI Publisher Database views with invalid objects.
The SQL {0} execution is complete.
The SQL {0} execution is complete.
The SQL {0} execution is complete.
The SQL {0} execution is complete.
The SQL {0} execution is complete.
The SQL {0} execution is complete.
Verifying if the Required BI Publisher Database views do not contain invalid objects any longer.
Invalid Objects from BI Publisher Database views have been removed.
2021-02-10_09-42-07AM: Configuration Assistant "BI Publisher Schema Configuration" has Succeeded.

2021-02-10_09-42-07AM: Configuration Assistant "OMS Configuration" is in progress.

Executing the OMSCA command...

Check the log files of the OMS Configuration Assistant at: /u01/app/oracle/middleware/cfgtoollogs/omsca




OMS Configuration Assistant completed successfully.

2021-02-10_09-52-14AM: Configuration Assistant "OMS Configuration" has Succeeded.

2021-02-10_09-52-14AM: Configuration Assistant "Plugins Deployment and Configuration" is in progress.




2021-02-10_09-59-40AM: Configuration Assistant "Plugins Deployment and Configuration" has Succeeded.

2021-02-10_09-59-40AM: Configuration Assistant "BI Publisher Configuration" is in progress.

2021-02-10_10-07-06AM: Configuration Assistant "BI Publisher Configuration" has Succeeded.

2021-02-10_10-07-06AM: Configuration Assistant "Start Oracle Management Service" is in progress.

Starting OMS ...
Executing the command: /u01/app/oracle/middleware/bin/emctl start oms

Starting of OMS is successful.
Starting export oms config...
Executing command: /u01/app/oracle/middleware/bin/emctl exportconfig oms -dir /u02/app/oracle/gc_inst/em/EMGC_OMS1/sysman/backup

Export config of OMS is successful.

2021-02-10_10-11-53AM: Configuration Assistant "Start Oracle Management Service" has Succeeded.

2021-02-10_10-11-53AM: Configuration Assistant "Agent Configuration Assistant" is in progress.

AgentConfiguration:agent configuration has been started

The AgentFreshInstaller is starting now
Oraclehome : ../u01/app/oracle/agent/agent_13.4.0.0.0
InstanceHome : /u01/app/oracle/agent/agent_inst
Agent Base Directory : /u01/app/oracle/agent
The oraclehome /u01/app/oracle/agent/agent_13.4.0.0.0
startAgent is:true
seci is :true
startAgent is:true
seci is :true
log loction is setlog
Creating log directoyr :/u01/app/oracle/agent/agent_13.4.0.0.0/cfgtoollogs/agentDeploy
Writing the following contents into /u01/app/oracle/agent/agent_13.4.0.0.0/install/oragchomelist
/u01/app/oracle/agent/agent_13.4.0.0.0:/u01/app/oracle/agent/agent_inst
Creating directory /u01/app/oracle/agent/agent_13.4.0.0.0/install/tmp completed successfully.
File /etc/oragchomelist exists.
File /etc/oragchomelist is writable.
Index :-1 for line : /u01/app/oracle/middleware
Index :0 for line : /u01/app/oracle/agent/agent_13.4.0.0.0
Overwriting the contents since oracle home:/u01/app/oracle/agent/agent_13.4.0.0.0 entry already exists.
Agent Home is : {0}
The value of chainInstall : true forceConfigure : false skipValidation : false
Validated the oms host and port :- PLVORAGRID----4903
Logs Location is : {0}
Getting Inet Addresses for host PLVORAGRID
** Agent Port Check completed successfully.**
Validated the agent port :- ----3872
Executing command: {0}
shared agent value is :false

Setting system property CUSTOM_INVENTORY to {0}
chain install is :true

Cloning of agent home completed successfully
Agent Configuration completed successfully
The following configuration scripts need to be executed as the "root" user. Root script to run : /u01/app/oracle/agent/agent_13.4.0.0.0/root.sh
AgentConfiguration:agent configuration finished with status = true

2021-02-10_10-13-23AM: Configuration Assistant "Agent Configuration Assistant" has Succeeded.

*** The Installation was Successful. ***

This information is also available at:

/u01/app/oracle/middleware/install/setupinfo.txt

See the following for information pertaining to your Enterprise Manager installation:

Use the following URL to access:

1. Enterprise Manager Cloud Control URL: https://PLVORAGRID:7803/em
2. Admin Server URL: https://PLVORAGRID:7102/console
3. BI Publisher URL: https://PLVORAGRID:9803/xmlpserver/servlet/home

The following details need to be provided while installing an additional OMS:

1. Admin Server Host Name: PLVORAGRID
2. Admin Server Port: 7102

You can find the details on ports used by this deployment at : /u01/app/oracle/middleware/install/portlist.ini

NOTE:
An encryption key has been generated to encrypt sensitive data in the Management Repository. If this key is lost, all encrypted data in the Repository becomes unusable.

A backup of the OMS configuration is available in /u02/app/oracle/gc_inst/em/EMGC_OMS1/sysman/backup on host PLVORAGRID. See Cloud Control Administrators Guide for details on how to back up and recover an OMS.

NOTE: This backup is valid only for the initial OMS configuration. For example, it will not reflect plug-ins installed later, topology changes like the addition of a load balancer, or changes to other properties made using emctl or emcli. Backups should be created on a regular basis to ensure they capture the current OMS configuration. Use the following command to backup the OMS configuration:
/u01/app/oracle/middleware/bin/emctl exportconfig oms -dir <backup dir>

Prompt for the allroot.sh
[oracle@PLVORAGRID install]$
[oracle@PLVORAGRID install]$

Como crear un HANFS en un Oracle RAC

Raúl Antonio Molina Alvarenga

04-05-2023

#OracleACE
#OracleTipsSV

Pasos para crear HANFS en un cluster
Se hace con root y los binarios crsctl y srvctl estan en:

/u01/app/19.0.0.0/grid/bin
1) Crear recurso havaip , es quien publica el nfs
Origen
/u01/app/19.0.0.0/grid/bin/srvctl add havip -id hrexports -address 20.2.1.92

2) crear el diskgroup y el ACFS

create diskgroup acfsdg NORMAL REDUNDANCY
DISK
'/dev/rdsk/disco*'
ATTRIBUTE 'content.type' = 'DATA',
'content.type' = 'DATA',
'AU_SIZE' = '4M',
'cell.smart_scan_capable'='TRUE',
'compatible.rdbms'='11.2.0.4',
'compatible.advm'='19.0.0.0',
'compatible.asm'='11.0.0.0';
---> Los discos usados fueron:
/dev/rdsk/disco1
/dev/rdsk/disco2
/dev/rdsk/disco3
/dev/rdsk/disco4

Volumen:

Diskgroup Name: acfsdg

Volume Name: volacfsdg
Volume Device: /dev/asm/vol_fsbcc1-20
State: ENABLED
Size (MB): 4194304
Resize Unit (MB): 64
Redundancy: MIRROR
Stripe Columns: 8
Stripe Width (K): 1024
Usage: ACFS
Mountpath: /origenfs
alter diskgroup acfsdg add volume volacfsdg size 8T;

 

3) Crear el FS
/u01/app/19.0.0.0/grid/bin/srvctl add filesystem -device /dev/asm/vol_fsbcc1-20 -volume VOLUME1 \
-diskgroup acfsdg -mountpath /origenfs
4) crear el export del acfs
origen
/u01/app/19.0.0.0/grid/bin/srvctl add exportfs -id hrexports -path /origenfs -name hrexport1 -options "rw,no_root_squash"
/u01/app/19.0.0.0/grid/bin/srvctl modify exportfs -name hrexport1 -options "rw,sync,no_wdelay,insecure,insecure_locks,no_root_squash"
4.1 ) encender nfs y rcpbind y dejarlos peremnes en los nodos del cluster que exporta el NFS
para redhat 7
systemctl start nfs
systemctl start rpcbind
--Para validar el status, debe indicar running en color verde.
systemctl status nfs
systemctl status rpcbind

5) encender el havip

/u01/app/19.0.0.0/grid/bin/srvctl start havip -id hrexports

6) Montar el NFS en un destino, para ejemplo destino:

Montar con /etc/fstab
20.2.1.92:/origenfs /origenfs nfs rw,bg,rsize=32768,wsize=32768

o montar manual:

mount -t nfs -o rw,bg,rsize=32768,wsize=32768 10.5.1.192:/origenfs /origenfs --> Linux

Espero les sea de utilidad.

Saludos.

Envío de Correos con PLSQL desde Base de Datos Oracle

Raúl Antonio Molina Alvarenga

26 de abril de 2023

#OracleTipsSV

#OracleACE

El envío de correos desde la base de Datos Oracle usando PLSQL es algo común, y en cierta medida necesario, mucha tarea o control de actividades puede desenvolverse con el envío de un correo oportuno orquestado desde la base de datos.

Vamos a comenzar indicando que prefiero usar un PLSQL que complicarme la existencia usando Java para esta tarea, siendo así, hay que indicar que los paquetes de BD  necesarios para el mismo antes en algunas versiones viejas era requerido instalarlos.

sqlplus /nolog

connect / as sysdba

@?/rdbms/admin/utlmail.sql

@?/rdbms/admin/prvtmail.plb

grant execute on utl_mail to public; --> puede ser o debería 
ser a un usuario particular

Debemos definir los datos de nuestro SMTP, y si la bd es 11.1 o superior, debemos configurar las reglas de salida o trafico de salida de la BD con las ACLs y si es 19c las ACE.

alter system set smtp_out_server = 'TuSMTP' scope=both;

select * from dba_network_acls;

Si hubieran borra los que hayan, si no ignora, 

BEGIN

DBMS_NETWORK_ACL_ADMIN.DROP_ACL(

acl => 'mail_access.xml');

END;

/

BEGIN

DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (

acl          => 'mail_access.xml',

description  => 'Permissions to access e-mail server.',

principal    => 'PUBLIC',

is_grant     => TRUE,

privilege    => 'connect');

COMMIT;

END;

/

BEGIN

DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (

acl          => 'mail_access.xml',

host         => 'TUSMTP'

);

COMMIT;

END;

/

 

Luego preparamos las unidades PLSQL que permitirán el envío de los correos, totalmente personalizables, permiten hasta envio de adjuntos,  formateo HTML para los visores de correo mas modernos, etc.

 

CREATE OR REPLACE PROCEDURE send_mail (p_to        IN VARCHAR2,

                                       p_from      IN VARCHAR2,

                                       p_subject   IN VARCHAR2,

                                       p_message   IN VARCHAR2,

                                       p_smtp_host IN VARCHAR2,

                                       p_smtp_port IN NUMBER DEFAULT 25)

AS

  l_mail_conn   UTL_SMTP.connection;

BEGIN

  l_mail_conn := UTL_SMTP.open_connection(p_smtp_host, p_smtp_port);

  UTL_SMTP.helo(l_mail_conn, p_smtp_host);

  UTL_SMTP.mail(l_mail_conn, p_from);

  UTL_SMTP.rcpt(l_mail_conn, p_to);

  UTL_SMTP.open_data(l_mail_conn);

  

  UTL_SMTP.write_data(l_mail_conn, 'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || UTL_TCP.crlf);

  UTL_SMTP.write_data(l_mail_conn, 'To: ' || p_to || UTL_TCP.crlf);

  UTL_SMTP.write_data(l_mail_conn, 'From: ' || p_from || UTL_TCP.crlf);

  UTL_SMTP.write_data(l_mail_conn, 'Subject: ' || p_subject || UTL_TCP.crlf);

  UTL_SMTP.write_data(l_mail_conn, 'Reply-To: ' || p_from || UTL_TCP.crlf || UTL_TCP.crlf);

  

  UTL_SMTP.write_data(l_mail_conn, p_message || UTL_TCP.crlf || UTL_TCP.crlf);

  UTL_SMTP.close_data(l_mail_conn);

  UTL_SMTP.quit(l_mail_conn);

END;

/

Ejemplo para probarlo con cualquier usuario,  por ejemplo enviando correos desde tu ID de correo.

 create user ssa identified by admin;

 grant connect,resource,dba to admin;

grant execute on sys.send_mail to admin;

BEGIN

  sys.send_mail(p_to        => 'correo@dominio',

            p_from      => 'correo1@dominio',

            p_subject   => 'Test Message',

            p_message   => 'This is a test message.',

            p_smtp_host => 'mail.ssasis.com');

END;

/

/  2    3    4    5    6    7    8  

PL/SQL procedure successfully completed.

Pudiendo tener resultados como el siguiente:

DR SYNC STATUS REPORT FOR DATABASE: db
INST_NAME LOG_ARCHIVED LOG_APPLIED TIME_APPLIED LOG_GAP
bd1 302281 302279 26-Apr, 05:49:20 2
bd2 300298 300297 26-Apr, 05:53:55 1
bd3 290118 290117 26-Apr, 05:53:53 1

 

Espero les sea de utilidad!!.

Saludos

Como agregar un nodo a un Cluster de Oracle Database, en modo silencioso.

Raúl Antonio Molina Alvarenga

23 de Abril de 2023

#OracleTipsSV

#OracleACEAssociate

Es de lo más común  en proyectos de Alta Disponibilidad de Oracle Database, que los Clusters  nazcan con la cantidad requerida de Nodos de computo que albergaran a las instancias de Base de Datos, es lo de más común; pero eso no significa, que ante la necesidad, no podamos agregar o remover un nodo de un cluster activo.

Hay una master Note de MOS que nos hace un resumen de dicho procedimiento para todas las versiones actuales y anteriores de Software Oracle, y es que aunque en las ultimas versiones el procedimental sea de lo mas parecido, debemos ser conscientes que la infraestructura interna del software las cosas si han cambiado bastante.

El DOCID:

How to Add Node/Instance or Remove Node/Instance with Oracle Clusterware and RAC (Doc ID 1332451.1)

Nos enfocaremos en la guia Oficial de 11.2:

https://docs.oracle.com/cd/E14795_01/doc/rac.112/e10717/adddelclusterware.htm#CHDFIAIE

Nuestro ambiente:

NOTA:Omito temas de configuraciones, así como salidas de comandos, en esencia la guía, muestra la sintaxis valida de los comandos para agregar un nodo.

Nodos: sa-nodo01, sa-nodo02

Nuestros pasos:

Debemos validar que la equivalencia de usuarios( oracle y grid si es que así lo hemos aplicado el role separation), esta correctamente configurado

./sshUserSetup.sh -user grid -hosts “sa-nodo01 sa-nodo02” -advanced -noPromptPassphrase

./sshUserSetup.sh -user oracle -hosts "sa-nodo01 sa-nodo02" -advanced -noPromptPassphrase

Debemos validar que contamos con todos los discos de preferencia con los mismos nombres de dispositivos:

ASMCMD [+] > lsdsk -G dggrid

/dev/rdsk/c1d12s0

/dev/rdsk/c1d13s0

/dev/rdsk/c1d14s0

ASMCMD [+] > lsdsk -G dgnada

/dev/rdsk/c1d10s0

/dev/rdsk/c1d11s0

/dev/rdsk/c1d4s0

/dev/rdsk/c1d5s0

/dev/rdsk/c1d6s0

/dev/rdsk/c1d7s0

/dev/rdsk/c1d8s0

/dev/rdsk/c1d9s0

ASMCMD [+] > lsdsk -G dgarch

/dev/rdsk/c1d18s0

/dev/rdsk/c1d19s0

/dev/rdsk/c1d20s0

mid

ASMCMD [+] > lsdsk -G dgarch

/dev/rdsk/c1d23s0

/dev/rdsk/c1d24s0

/dev/rdsk/c1d25s0 —> 

ASMCMD [+] > lsdsk -G dggrid

/dev/rdsk/c1d10s0

/dev/rdsk/c1d11s0

/dev/rdsk/c1d9s0

ASMCMD [+] > lsdsk -G dgnada

/dev/rdsk/c1d12s0

/dev/rdsk/c1d13s0

/dev/rdsk/c1d14s0

/dev/rdsk/c1d15s0

/dev/rdsk/c1d16s0

/dev/rdsk/c1d18s0

/dev/rdsk/c1d19s0

/dev/rdsk/c1d20s0

/dev/rdsk/c1d21s0

/dev/rdsk/c1d22s0

meta

ASMCMD [+] > lsdsk -G dgnada

/dev/rdsk/c1d10s0

/dev/rdsk/c1d11s0

/dev/rdsk/c1d7s0

/dev/rdsk/c1d8s0

/dev/rdsk/c1d9s0

ASMCMD [+] > lsdsk -G dggrid

/dev/rdsk/c1d4s0

/dev/rdsk/c1d5s0

/dev/rdsk/c1d6s0

ASMCMD [+] > lsdsk -G dgarch

/dev/rdsk/c1d12s0

/dev/rdsk/c1d13s0

/dev/rdsk/c1d14s0

ASMCMD [+] >

chmod 660 /dev/rdsk/c1d10s0

chmod 660 /dev/rdsk/c1d11s0

chmod 660 /dev/rdsk/c1d7s0

chmod 660 /dev/rdsk/c1d8s0

chmod 660 /dev/rdsk/c1d9s0

chmod 660 /dev/rdsk/c1d4s0

chmod 660 /dev/rdsk/c1d5s0

chmod 660 /dev/rdsk/c1d6s0

chmod 660 /dev/rdsk/c1d12s0

chmod 660 /dev/rdsk/c1d13s0

chmod 660 /dev/rdsk/c1d14s0

chown grid:asmadmin /dev/rdsk/c1d10s0

chown grid:asmadmin /dev/rdsk/c1d11s0

chown grid:asmadmin /dev/rdsk/c1d7s0

chown grid:asmadmin /dev/rdsk/c1d8s0

chown grid:asmadmin /dev/rdsk/c1d9s0

chown grid:asmadmin /dev/rdsk/c1d4s0

chown grid:asmadmin /dev/rdsk/c1d5s0

chown grid:asmadmin /dev/rdsk/c1d6s0

chown grid:asmadmin /dev/rdsk/c1d12s0

chown grid:asmadmin /dev/rdsk/c1d13s0

chown grid:asmadmin /dev/rdsk/c1d14s0

También debemos entender y  contemplar que la infraestructura de red este en correcto funcionamiento, podemos usar la siguiente DOCID de MOS:

How to Validate Network and Name Resolution Setup for the Clusterware and RAC (Doc ID 1054902.1)

Si cuando se instalo el o los nodos originales se ignoro alguna revision, y no sabemos dicho resultado, podemos de antemano, obviar dichas validaciones estableciendo esta variable de ambiente en Y:

export IGNORE_PREADDNODE_CHECKS=Y

Una vez todo esta revisado y validado procedemos a desplegar 
el nodo nuevo agregandolo a la capa de GI
cd $ORACLE_HOME/oui/bin

./addNode.sh -silent "CLUSTER_NEW_NODES={sa-nodo02}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={sa-nodo02-vip}"

Ahora, debemos agregar la capa de software del RDBMS, usualmente con el usuario oracle.

##oracle

cd $ORACLE_HOME/oui/bin

./addNode.sh -silent "CLUSTER_NEW_NODES={sa-nodo02}"

Ahora debemos agregar la siguiente instancia que se ejecutara en el nodo recién agregado, vamos a extender la BD o las BDs en 1 instancia adicional:

dbca -silent -addInstance -nodeList sa-nodo02 -gdbName osmdata -instanceName osmdata2 -sysDBAUserName sys -sysDBAPassword oracle11g

dbca -silent -addInstance -nodeList sa-nodo02 -gdbName ocpdb -instanceName ocpdb2 -sysDBAUserName sys -sysDBAPassword oracle11g

dbca -silent -addInstance -nodeList sa-nodo02 -gdbName cepdb -instanceName cepdb2 -sysDBAUserName sys -sysDBAPassword oracle11g

dbca -silent -addInstance -nodeList sa-nodo02 -gdbName osmdata -instanceName osmdata2 -sysDBAUserName sys -sysDBAPassword oracle11g

dbca -silent -addInstance -nodeList sa-nodo02 -gdbName load -instanceName load2 -sysDBAUserName sys -sysDBAPassword oracle11g

El resultado final, un cluster con 2 nodos:

grid@sa-nodo02:~$ crs_stat -t

Name           Type           Target    State     Host        

------------------------------------------------------------

ora.DGARCH.dg  ora....up.type ONLINE    ONLINE    sa-nodo01

ora.DGGRID.dg  ora....up.type ONLINE    ONLINE    sa-nodo01

ora.DGnada.dg  ora....up.type ONLINE    ONLINE    sa-nodo01

ora....ER.lsnr ora....er.type ONLINE    ONLINE    sa-nodo01

ora....N1.lsnr ora....er.type ONLINE    ONLINE    sa-nodo02

ora....N2.lsnr ora....er.type ONLINE    ONLINE    sa-nodo01

ora....N3.lsnr ora....er.type ONLINE    ONLINE    sa-nodo01

ora.asm        ora.asm.type   ONLINE    ONLINE    sa-nodo01

ora.cepdb.db   ora....se.type ONLINE    ONLINE    sa-nodo01

ora.cvu        ora.cvu.type   ONLINE    ONLINE    sa-nodo02

ora.esbdata.db ora....se.type ONLINE    ONLINE    sa-nodo01

ora.gsd        ora.gsd.type   OFFLINE   OFFLINE               

ora....network ora....rk.type ONLINE    ONLINE    sa-nodo01

ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    sa-nodo02

ora.ocpdb.db   ora....se.type ONLINE    ONLINE    sa-nodo01

ora.ons        ora.ons.type   ONLINE    ONLINE    sa-nodo01

ora.osmdata.db ora....se.type ONLINE    ONLINE    sa-nodo01

ora....ry.acfs ora....fs.type ONLINE    ONLINE    sa-nodo01

ora....SM1.asm application    ONLINE    ONLINE    sa-nodo01

ora....01.lsnr application    ONLINE    ONLINE    sa-nodo01

ora....b01.gsd application    OFFLINE   OFFLINE               

ora....b01.ons application    ONLINE    ONLINE    sa-nodo01

ora....b01.vip ora....t1.type ONLINE    ONLINE    sa-nodo01

ora....SM2.asm application    ONLINE    ONLINE    sa-nodo02

ora....02.lsnr application    ONLINE    ONLINE    sa-nodo02

ora....b02.gsd application    OFFLINE   OFFLINE               

ora....b02.ons application    ONLINE    ONLINE    sa-nodo02

ora....b02.vip ora....t1.type ONLINE    ONLINE    sa-nodo02

ora.scan1.vip  ora....ip.type ONLINE    ONLINE    sa-nodo02

ora.scan2.vip  ora....ip.type ONLINE    ONLINE    sa-nodo01

ora.scan3.vip  ora....ip.type ONLINE    ONLINE    sa-nodo01

ps -fea | grep pmon

    grid 21207     1   0 21:47:06 ?           0:01 asm_pmon_+ASM2

  oracle  5566     1   0 22:25:00 ?           0:00 ora_pmon_osmdata2

  oracle  7364     1   0 22:29:42 ?           0:00 ora_pmon_ocpdb2

  oracle  9184     1   0 22:34:28 ?           0:00 ora_pmon_cepdb2

  oracle  9886     1   0 22:35:42 ?           0:00 ora_pmon_esbdata2

    grid 10189  9429   0 22:36:31 pts/1       0:00 grep pmon

grid@sa-nodo02:~$ crs_stat -t

Name           Type           Target    State     Host        

------------------------------------------------------------

ora.DGARCH.dg  ora....up.type ONLINE    ONLINE    sa-nodo01

ora.DGGRID.dg  ora....up.type ONLINE    ONLINE    sa-nodo01

ora.DGnada.dg  ora....up.type ONLINE    ONLINE    sa-nodo01

ora....ER.lsnr ora....er.type ONLINE    ONLINE    sa-nodo01

ora....N1.lsnr ora....er.type ONLINE    ONLINE    sa-nodo02

ora....N2.lsnr ora....er.type ONLINE    ONLINE    sa-nodo01

ora....N3.lsnr ora....er.type ONLINE    ONLINE    sa-nodo01

ora.asm        ora.asm.type   ONLINE    ONLINE    sa-nodo01

ora.cepdb.db   ora....se.type ONLINE    ONLINE    sa-nodo01

ora.cvu        ora.cvu.type   ONLINE    ONLINE    sa-nodo02

ora.esbdata.db ora....se.type ONLINE    ONLINE    sa-nodo01

ora.gsd        ora.gsd.type   OFFLINE   OFFLINE               

ora....network ora....rk.type ONLINE    ONLINE    sa-nodo01

ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    sa-nodo02

ora.ocpdb.db   ora....se.type ONLINE    ONLINE    sa-nodo01

ora.ons        ora.ons.type   ONLINE    ONLINE    sa-nodo01

ora.osmdata.db ora....se.type ONLINE    ONLINE    sa-nodo01

ora....ry.acfs ora....fs.type ONLINE    ONLINE    sa-nodo01

ora....SM1.asm application    ONLINE    ONLINE    sa-nodo01

ora....01.lsnr application    ONLINE    ONLINE    sa-nodo01

ora....b01.gsd application    OFFLINE   OFFLINE               

ora....b01.ons application    ONLINE    ONLINE    sa-nodo01

ora....b01.vip ora....t1.type ONLINE    ONLINE    sa-nodo01

ora....SM2.asm application    ONLINE    ONLINE    sa-nodo02

ora....02.lsnr application    ONLINE    ONLINE    sa-nodo02

ora....b02.gsd application    OFFLINE   OFFLINE               

ora....b02.ons application    ONLINE    ONLINE    sa-nodo02

ora....b02.vip ora....t1.type ONLINE    ONLINE    sa-nodo02

ora.scan1.vip  ora....ip.type ONLINE    ONLINE    sa-nodo02

ora.scan2.vip  ora....ip.type ONLINE    ONLINE    sa-nodo01

ora.scan3.vip  ora....ip.type ONLINE    ONLINE    sa-nodo01

Espero les sea de utilidad.

Saludos!!

De la guia:

Adding a Cluster Node on Linux and UNIX Systems

This procedure describes how to add a node to your cluster. This procedure assumes that:

  • There is an existing cluster with a node named node1
  • You are adding a node named node2
  • You have successfully installed Oracle Clusterware on node1 in a nonshared home, where Grid_home represents the successfully installed home

To add a node:

  1. Ensure that you have successfully installed Oracle Clusterware on at least one node in your cluster environment. To perform the following procedure, Grid_home must identify your successfully installed Oracle Clusterware home.

    See Also:

    Oracle Grid Infrastructure Installation Guide for Oracle Clusterware installation instructions

  2. Verify the integrity of the cluster and node2:
    $ cluvfy stage -pre nodeadd -n node2 [-fixup [-fixupdir fixup_dir]] [-verbose]
    

    You can specify the -fixup option and a directory into which CVU prints instructions to fix the cluster or node if the verification fails.

  3. Navigate to the Grid_home/oui/bin directory on node1 and run the addNode.sh script using the following syntax, where node2 is the name of the node that you are adding and node2-vip is the VIP name for the node:If you are using Grid Naming Service (GNS):
    $ ./addNode.sh -silent "CLUSTER_NEW_NODES={node2,node3}"
    

    If you are not using GNS:

    $ ./addNode.sh -silent "CLUSTER_NEW_NODES={node2,node3}""CLUSTER_NEW_VIRTUAL_HOSTNAMES={node2-vip,node3-vip}" 
    

    Alternatively, you can specify the entries shown in Example 4-1 in a response file, where file_name is the name of the file, and run the addNode.sh script, as follows:

    $ addNode.sh -silent -responseFile file_name
    

    When prompted, run root.sh before the addNode.sh script completes.

 

Historial del Crecimiento del Tamaño de la Base de Datos Oracle

Raúl Antonio Molina Alvarenga

19 de Abril de 2023

#OracleACE

#OracleTipsSV

A veces nos hacen la pregunta, cuanto espacio debemos reservar para el crecimiento a futuro de la base de datos, o cuanto espacio hemos consumido en un año anterior.

Esa información de forma natural en la base de datos, sin precalcularlo es un poco complejo obtenerla, especialmente si no tenemos vistas históricas que se obtienen con EE y Packs de diagnóstico y tuneo.

Aquí un pequeño TIP para poder calcular dicha información y almacenarlo, no considera el UNDO  y TEMP, solo Información real de usuario.

Crear Tabla que almacenara la información histórica.

create table db_space_hist (

timestamp    date,

total_space  number(8),

used_space   number(8),

free_space   number(8),

        pct_inuse    number(5,2),

        num_db_files number(5)

);

 

Crear procedimiento de colección de Información:

CREATE OR REPLACE PROCEDURE db_space_history AS

BEGIN

   INSERT INTO db_space_hist 

SELECT SYSDATE, total_space,

        total_space-NVL(free_space,0) used_space,

        NVL(free_space,0) free_space,

        ((total_space - NVL(free_space,0)) / total_space)*100 pct_inuse,

        num_db_files

 FROM ( SELECT SUM(bytes)/1024/1024 free_space

        FROM   sys.DBA_FREE_SPACE WHERE tablespace_name NOT LIKE '%UNDO%') FREE,

      ( SELECT SUM(bytes)/1024/1024 total_space,

               COUNT(*) num_db_files

        FROM   sys.DBA_DATA_FILES WHERE tablespace_name NOT LIKE '%UNDO%') FULL;

   COMMIT;

END;

/

Crear el JOB que calculara la información, la Frecuencia puede ser la deseada, o necesitada, diaria, semanal , mensual.(Puede usarse o mejor dicho usar Scheduler JOBS).

DECLARE

  X NUMBER;

BEGIN

  SYS.DBMS_JOB.SUBMIT

    (

      job        => X

     ,what       => 'OBS.DB_SPACE_HISTORY;'

     ,next_date  => sysdate+1

     ,INTERVAL   => 'TRUNC(SYSDATE+7)'

     ,no_parse   => FALSE

    );

END;

La información se consulta asi:

select * from db_space_hist order by timestamp desc;

Espero les sea de Utilidad

Saludos.

 

Oracle Database 19c : Demo Construcción de un Data Guard Fácil .

Raúl Antonio Molina Alvarenga

18 de Abril de 2023

#OracleACEAssociate

#OracleTipsSV

Vamos a ver una guía para poder construir rápidamente un Oracle Data Guard en versión 19c.

Para lograrlo use 2 maquinas Compute Instance en una de mis cuentas Always Free Tier.

Host Origen: linux7

Host Destino: standbylinux7

Version Software Oracle Database: 19c (19.3)

Clusterware: No

Multitenant: No

Asumpciones:

  • No es detallado en algunos elementos como Preparación de maquinas Virtuales
  • Instalación de Software Oracle
  • Explicación detallada de Oracle Data Guard

Rápidamente, use la guía de instalación de Oracle 19c con el formato RPM:

https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/running-rpm-packages-to-install-oracle-database.html#GUID-BB7C11E3-D385-4A2F-9EAF-75F4F0AACF02

Installing Oracle Database RPM Manually

Esto debe realizarse en los N Nodos que formaran el Conjunto Data Guard, para mi ejemplo 2 Nodos.

  1. Log in as root. 
  2. Download and install the Oracle Database Preinstallation RPM:
    1. Descargar el rpm de 
      https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
    2. Instalar el software con el rpm 
      # yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

La instalación del Software esta ahora completa.

Creación de la Base de datos

Puede hacerse la creación de la Base de Datos en el Servidor Origen, usando el tool del rpm de instalación o lanzar el dbca de forma normal, pongo los 2 ejemplos.

  1. Conectarse con root
  2. To configure a sample Oracle Database instance, run the following service configuration script:
    # /etc/init.d/oracledb_ORCLCDB-19c configure

Usando el metodo silencioso tipico con dbca:

nohup dbca -silent -createDatabase                                                    \

     -templateName General_Purpose.dbc                                          \

     -gdbname emcdb -sid emcdb -responseFile NO_VALUE                           \

     -characterSet AL32UTF8                                                     \

     -sysPassword syspassword1                                                  \

     -systemPassword syspassword1                                               \                                           \

     -databaseType MULTIPURPOSE                                                 \

     -totalMemory 388                                                          \

     -storageType FS                                                            \

     -datafileDestination /u01/app/oracle/oradata                                          \

     -redoLogFileSize 600                                                       \

     -emConfiguration NONE                                                      \

     -ignorePreReqs &

-bash-4.2$ cat nohup.out 

[WARNING] [DBT-11205] Specified shared pool size does not meet the recommended minimum size requirement. This might cause database creation to fail.

   ACTION: Specify at least (481 MB) for shared pool size.

[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.

   CAUSE: 

a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].

b.The password entered is a keyword that Oracle does not recommend to be used as password

   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.

[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.

   CAUSE: 

a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].

b.The password entered is a keyword that Oracle does not recommend to be used as password

   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.

Prepare for db operation

10% complete

Copying database files

40% complete

Creating and starting Oracle instance

42% complete

46% complete

50% complete

54% complete

60% complete

Completing Database Creation

66% complete

69% complete

70% complete

Executing Post Configuration Actions

100% complete

Database creation complete. For details check the logfiles at:

 /opt/oracle/cfgtoollogs/dbca/emcdb.

Database Information:

Global Database Name:emcdb

System Identifier(SID):emcdb

Look at the log file "/opt/oracle/cfgtoollogs/dbca/emcdb/emcdb.log" for further details.

-bash-4.2$ 

A este punto tenemos correctamente configurada una Base de Datos 19c en el servidor Origen.

Asumiremos, que logramos

  • Configuramos la maquina virtual correctamente
  • Instalar en el servidor Destino o nodo2 el Software Oracle Database
  • Tenemos reglas de transferencia y comunicación entre los nodos (firewall y access list en la VCN).

Ademas, debemos

  • Trasladado el Password file de la BD creada , así como  el init (mejor spfile) , el tnsnames.ora hacia el servidor destino.
  • Con el spfile, iniciamos la instancia en el nodo2

Ahora vamos a Crear la replica, que método usaremos, bueno el ahora método preferido para mi, duplicación via el servicio:

Nota: Durante la clonación,  me percate que no tenia en Modo archive la BD Origen.

-bash-4.2$ rman target  sys/syspassword1

RMAN> restore standby controlfile from service emcdb;

Starting restore at 18-APR-23

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=255 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: using network backup set from service emcdb

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

output file name=/u01/app/oracle/oradata/EMCDB/control01.ctl

output file name=/u01/app/oracle/oradata/EMCDB/control02.ctl

Finished restore at 18-APR-23

RMAN> 

 restore database from service emcdb;

Starting restore at 18-APR-23

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=255 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: using network backup set from service emcdb

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/EMCDB/system01.dbf

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 04/18/2023 21:12:45

ORA-19845: error in backupDataFile while communicating with remote database server

ORA-17628: Oracle error 19602 returned by remote Oracle server

ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

ORA-19660: some files in the backup set could not be verified

ORA-19661: datafile 1 could not be verified

ORA-19845: error in backupDataFile while communicating with remote database server

ORA-17628: Oracle error 19602 returned by remote Oracle server

ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

SQL> shutdown immediate

startup mount;

ORACLE instance started.

Total System Global Area  524285856 bytes

Fixed Size     8898464 bytes

Variable Size   285212672 bytes

Database Buffers   222298112 bytes

Redo Buffers     7876608 bytes

Database mounted.

SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

restore database from service emcdb;

Starting restore at 18-APR-23

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=256 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: using network backup set from service emcdb

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/EMCDB/system01.dbf

channel ORA_DISK_1: restore complete, elapsed time: 00:00:25

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: using network backup set from service emcdb

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/EMCDB/sysaux01.dbf

channel ORA_DISK_1: restore complete, elapsed time: 00:00:16

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: using network backup set from service emcdb

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/EMCDB/undotbs01.dbf

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: using network backup set from service emcdb

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/EMCDB/users01.dbf

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 18-APR-23

RMAN> 

recover database from service emcdb;

Starting recover at 18-APR-23

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=255 device type=DISK

skipping datafile 1; already restored to SCN 2065656

skipping datafile 3; already restored to SCN 2065666

skipping datafile 4; already restored to SCN 2065672

skipping datafile 7; already restored to SCN 2065675

starting media recovery

RMAN-08187: warning: media recovery until SCN 2064663 complete

Finished recover at 18-APR-23

Continuamos, ya tenemos la replica, ahora hay que configurar el paso del Broker, es demasiado util para dejar de usarlo:

dgmgrl /  –>  a veces es necesario para algunas tareas usar sys y su password.

Me di cuenta que me falto encender el parámetros de broker en ambos sitios

CREATE CONFIGURATION emcdbdrp as primary database is emcdb connect identifier is emcdb;

Error: 

ORA-16525: The Oracle Data Guard broker is not yet available.

DGMGRL> 

SQL> alter system set dg_broker_start=true;

System altered.

SQL> 

DGMGRL> enable configuration;

Enabled.

DGMGRL> show configuration;

Configuration - emcdbdrp

  Protection Mode: MaxPerformance

  Members:

  emcdb  - Primary database

    Warning: ORA-16789: standby redo logs configured incorrectly

    emcdbr - Physical standby database 

      Warning: ORA-16809: multiple warnings detected for the member

Fast-Start Failover:  Disabled

Configuration Status:

WARNING   (status updated 36 seconds ago)

DGMGRL> show database emcdbr

Database - emcdbr

  Role:               PHYSICAL STANDBY

  Intended State:     APPLY-ON

  Transport Lag:      1 minute 58 seconds (computed 46 seconds ago)

  Apply Lag:          1 minute 58 seconds (computed 46 seconds ago)

  Average Apply Rate: 18.95 MByte/s

  Real Time Query:    OFF

  Instance(s):

    emcdb

  Database Warning(s):

    ORA-16853: apply lag has exceeded specified threshold

    ORA-16855: transport lag has exceeded specified threshold

    ORA-16857: member disconnected from redo source for longer than specified threshold

    ORA-16789: standby redo logs configured incorrectly

Database Status:

WARNING

 

Como PLUS, vamos a activar Active Data Guard (ADG) , en el sitio alterno, o nodo 2 , o sitio secundario:

SQL> alter database open;

Database altered.

DGMGRL> 

Database - emcdbr

  Role:               PHYSICAL STANDBY

  Intended State:     APPLY-ON

  Transport Lag:      8 minutes 1 second (computed 59 seconds ago)

  Apply Lag:          8 minutes 1 second (computed 59 seconds ago)

  Average Apply Rate: 18.95 MByte/s

  Real Time Query:    ON

  Instance(s):

    emcdb

  Database Warning(s):

    ORA-16853: apply lag has exceeded specified threshold

    ORA-16855: transport lag has exceeded specified threshold

    ORA-16857: member disconnected from redo source for longer than specified threshold

    ORA-16789: standby redo logs configured incorrectly

Database Status:

WARNING

DGMGRL> 

 edit database emcdbr set state=apply-on;

Succeeded.

DGMGRL> show configuration;

Configuration - emcdbdrp

  Protection Mode: MaxPerformance

  Members:

  emcdb  - Primary database

    emcdbr - Physical standby database 

      Warning: ORA-16809: multiple warnings detected for the member

Fast-Start Failover:  Disabled

Configuration Status:

WARNING   (status updated 47 seconds ago)

DGMGRL> show database emcdbr;

Database - emcdbr

  Role:               PHYSICAL STANDBY

  Intended State:     APPLY-ON

  Transport Lag:      50 minutes 18 seconds (computed 17 seconds ago)

  Apply Lag:          50 minutes 18 seconds (computed 17 seconds ago)

  Average Apply Rate: 18.95 MByte/s

  Real Time Query:    ON

  Instance(s):

    emcdb

  Database Warning(s):

    ORA-16853: apply lag has exceeded specified threshold

    ORA-16855: transport lag has exceeded specified threshold

Database Status:

WARNING

DGMGRL> sql ' alter system switch logfile'

Succeeded.

DGMGRL> 

DGMGRL> show database emcdbr;

Database - emcdbr

  Role:               PHYSICAL STANDBY

  Intended State:     APPLY-ON

  Transport Lag:      0 seconds (computed 1 second ago)

  Apply Lag:          0 seconds (computed 1 second ago)

  Average Apply Rate: 553.00 KByte/s

  Real Time Query:    ON

  Instance(s):

    emcdb

Database Status:

SUCCESS

DGMGRL> 

Voy a intentar la validación de configuración y sitios antes de intentar el switchover,  previo a esto recordé que debo  configurar el Flashback, Necesario para FSFO y otros beneficios.

SQL> alter database flashback on;

alter database flashback on

*

ERROR at line 1:

ORA-38706: Cannot turn on FLASHBACK DATABASE logging.

ORA-38707: Media recovery is not enabled.

SQL> alter database archivelog;

alter database archivelog

*

ERROR at line 1:

ORA-01126: database must be mounted in this instance and not open in any

instance

SQL> archive log list;

Database log mode       No Archive Mode

Automatic archival       Enabled

Archive destination       /opt/oracle/product/19c/dbhome_1/dbs/arch

Oldest online log sequence     1

Current log sequence       2

SQL> select status,open_mode from v$database,v$instance;

STATUS     OPEN_MODE

------------ --------------------

OPEN     READ ONLY WITH APPLY

SQL> 

La validación me indica debo cubrir las entradas estáticas que el broker requiere , esto debido que no hay srvctl , o Oracle Restart.

Ademas tenemos otro punto a cubrir, los Standby RedoLogs o SRL.

Recordemos que tenemos dos tipos de Redologs , Online, y Standby.

DGMGRL>validate database emcdb;

  Database Role:    Primary database

  Ready for Switchover:  Yes

  Managed by Clusterware:

    emcdb:  NO             

    Validating static connect identifier for the primary database emcdb...

Unable to connect to database using (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux7.subnet.vcn.oraclevcn.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=emcdb_DGMGRL)(INSTANCE_NAME=emcdb)(SERVER=DEDICATED)(STATIC_SERVICE=TRUE)))

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Failed.

    Warning: Ensure primary database's StaticConnectIdentifier property

    is configured properly so that the primary database can be restarted

    by DGMGRL after switchover

DGMGRL>  validate database emcdbr;

  Database Role:     Physical standby database

  Primary Database:  emcdb

  Ready for Switchover:  Yes

  Ready for Failover:    Yes (Primary Running)

  Managed by Clusterware:

    emcdb :  NO             

    emcdbr:  NO             

    Validating static connect identifier for the primary database emcdb...

Unable to connect to database using (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux7.subnet.vcn.oraclevcn.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=emcdb_DGMGRL)(INSTANCE_NAME=emcdb)(SERVER=DEDICATED)(STATIC_SERVICE=TRUE)))

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Failed.

    Warning: Ensure primary database's StaticConnectIdentifier property

    is configured properly so that the primary database can be restarted

    by DGMGRL after switchover

  Log Files Cleared:

    emcdb Standby Redo Log Files:   Cleared

    emcdbr Online Redo Log Files:   Not Cleared

    emcdbr Standby Redo Log Files:  Available

  Current Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status       

              (emcdb)                 (emcdbr)                             

    1         3                       2                       Insufficient SRLs

  Future Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status       

              (emcdbr)                (emcdb)                              

    1         3                       0                       Insufficient SRLs

    Warning: standby redo logs not configured for thread 1 on emcdb

DGMGRL> exit

sql-bash-4.2$ dgmgrl /

DGMGRL for Linux: Release 19.0.0.0.0 - Production on Tue Apr 18 22:36:07 2023

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.

Connected to "emcdb"

Connected as SYSDG.

DGMGRL> validate database emcdr;

Object "emcdr" was not found

DGMGRL> validate database emcdbr;

  Database Role:     Physical standby database

  Primary Database:  emcdb

  Ready for Switchover:  Yes

  Ready for Failover:    Yes (Primary Running)

  Managed by Clusterware:

    emcdb :  NO             

    emcdbr:  NO             

    Validating static connect identifier for the primary database emcdb...

Unable to connect to database using (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux7.subnet.vcn.oraclevcn.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=emcdb_DGMGRL)(INSTANCE_NAME=emcdb)(SERVER=DEDICATED)(STATIC_SERVICE=TRUE)))

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Failed.

    Warning: Ensure primary database's StaticConnectIdentifier property

    is configured properly so that the primary database can be restarted

    by DGMGRL after switchover

  Log Files Cleared:

    emcdb Standby Redo Log Files:   Cleared

    emcdbr Online Redo Log Files:   Not Cleared

    emcdbr Standby Redo Log Files:  Available

  Current Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status       

              (emcdb)                 (emcdbr)                             

    1         3                       2                       Insufficient SRLs

  Future Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status       

              (emcdbr)                (emcdb)                              

    1         3                       0                       Insufficient SRLs

    Warning: standby redo logs not configured for thread 1 on emcdb
Las entradas estáticas en el listener.ora quedo dela siguiente manera, 
recordemos que debemos reiniciar el listener para que ese cambio tome efecto.
No usar reload.

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = linux7.subnet.vcn.oraclevcn.com)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

  )

SID_LIST_LISTENER=

  (SID_LIST=

    (SID_DESC=

      (SID_NAME=emcdb)

      (GLOBAL_DBNAME=emcdb_DGMGRL)

      (ORACLE_HOME=/opt/oracle/product/19c/dbhome_1)

    )

  )

-bash-4.2$ 
Ajustaremos la entrada estatica mas simple en el broker:

DGMGRL>

edit database emcdb set property staticconnectidentifier='(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(PORT=1521)(HOST=10.0.0.3))(CONNECT_DATA=(SERVICE_NAME= emcdb_DGMGRL)(INSTANCE_NAME=emcdb)(SERVER=DEDICATED)))';

edit database emcdbr set property staticconnectidentifier='(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(PORT=1521)(HOST=10.0.0.4))(CONNECT_DATA=(SERVICE_NAME= emcdbr_DGMGRL)(INSTANCE_NAME=emcdb)(SERVER=DEDICATED)))';
Intentaremos nuevamente la validación:


DGMGRL> validate database emcdb;

  Database Role:    Primary database

  Ready for Switchover:  Yes

  Managed by Clusterware:

    emcdb:  NO             

    Validating static connect identifier for the primary database emcdb...

    The static connect identifier allows for a connection to database "emcdb".

DGMGRL> validate database emcdbr;

  Database Role:     Physical standby database

  Primary Database:  emcdb

  Ready for Switchover:  Yes

  Ready for Failover:    Yes (Primary Running)

  Managed by Clusterware:

    emcdb :  NO             

    emcdbr:  NO             

    Validating static connect identifier for the primary database emcdb...

    The static connect identifier allows for a connection to database "emcdb".

  Log Files Cleared:

    emcdb Standby Redo Log Files:   Cleared

    emcdbr Online Redo Log Files:   Not Cleared

    emcdbr Standby Redo Log Files:  Available

  Current Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status       

              (emcdb)                 (emcdbr)                             

    1         3                       2                       Insufficient SRLs

  Future Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status       

              (emcdbr)                (emcdb)                              

    1         3                       0                       Insufficient SRLs

    Warning: standby redo logs not configured for thread 1 on emcdb

Vamos a corregir el tema de los standby redologs en ambos sitios, borramos los que están mal ( quedaron con thread 0), y los agregamos de forma correcta.

Por defecto el dbca crea 3 Online redologs, en este caso de 600mb, y para seguir la regla de la documentacion, debemos crear N+1 standby Redologs, donde N es la cantidad de Online Redologs x Thread, en el caso es un solo thread, porque es SingleInstance.

SQL> select thread#, group#, sequence#, status, bytes from v$standby_log;

   THREAD#     GROUP#  SEQUENCE# STATUS  BYTES

---------- ---------- ---------- ---------- ----------

0    4       0 UNASSIGNED  629145600

0    5       0 UNASSIGNED  629145600

0    6       0 UNASSIGNED  629145600

0    7       0 UNASSIGNED  629145600

alter database add standby logfile thread 1   size 600m;

Volvemos a intentar la validación:

 

-bash-4.2$ dgmgrl sys/syspassword1

DGMGRL for Linux: Release 19.0.0.0.0 - Production on Tue Apr 18 23:23:34 2023

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.

Connected to "emcdb"

Connected as SYSDBA.

DGMGRL> sql ' alter system switch logfile';

Succeeded.

DGMGRL> validate database emcdb;

  Database Role:    Primary database

  Ready for Switchover:  Yes

  Managed by Clusterware:

    emcdb:  NO             

    Validating static connect identifier for the primary database emcdb...

    The static connect identifier allows for a connection to database "emcdb".

DGMGRL> validate database emcdbr;

  Database Role:     Physical standby database

  Primary Database:  emcdb

  Ready for Switchover:  Yes

  Ready for Failover:    Yes (Primary Running)

  Managed by Clusterware:

    emcdb :  NO             

    emcdbr:  NO             

    Validating static connect identifier for the primary database emcdb...

    The static connect identifier allows for a connection to database "emcdb".

  Log Files Cleared:

    emcdb Standby Redo Log Files:   Cleared

    emcdbr Online Redo Log Files:   Not Cleared

    emcdbr Standby Redo Log Files:  Available

DGMGRL> 

Intentemos el Swicthover:

DGMGRL> switchover to emcdbr;

Performing switchover NOW, please wait...

Operation requires a connection to database "emcdbr"

Connecting ...

Connected to "emcdbr"

Connected as SYSDBA.

New primary database "emcdbr" is opening...

Operation requires start up of instance "emcdb" on database "emcdb"

Starting instance "emcdb"...

Connected to an idle instance.

ORACLE instance started.

Connected to "emcdb"

Database mounted.

Database opened.

Connected to "emcdb"

Switchover succeeded, new primary is "emcdbr"

DGMGRL> 

Del log, en la secuencia de tiempo, podemos notar que demoro menos de 2 Minutos:

SWITCHOVER VERIFY COMPLETE

2023-04-18T23:27:09.914922+00:00

Additional information: 7

2023-04-18T23:27:14.836244+00:00

 rfs (PID:8201): Selected LNO:5 for T-1.S-11 dbid 888512743 branch 1134441066

2023-04-18T23:27:15.108620+00:00

PR00 (PID:7203): Resetting standby activation ID 888530151 (0x34f5e4e7)

2023-04-18T23:27:15.126778+00:00

Media Recovery End-Of-Redo indicator encountered

....

TMI: kcv_commit_to_so_to_primary Switchover from physical END 2023-04-18 23:28:06.692280

SWITCHOVER: completed request from primary database.

2023-04-18T23:28:12.732013+00:00

ALTER SYSTEM SET fal_server='' SCOPE=BOTH;

2023-04-18T23:28:12.735019+00:00

Starting background process NSV1

2023-04-18T23:28:12.749558+00:00

NSV1 started with pid=26, OS id=8428 

2023-04-18T23:28:14.946580+00:00

ARC0 (PID:5163): Becoming the 'no SRL' ARCH

2023-04-18T23:28:16.040815+00:00

RSM0 (PID:5182): Using STANDBY_ARCHIVE_DEST parameter default value as /opt/oracle/product/19c/dbhome_1/dbs/arch [krsd.c:18141]

2023-04-18T23:28:16.049990+00:00

ALTER SYSTEM SET log_archive_dest_2='service="emcdb"','ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 reopen=300 db_unique_name="emcdb" net_timeout=30','valid_for=(online_logfile,all_roles)' SCOPE=BOTH;

2023-04-18T23:28:16.109045+00:00

ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=BOTH;

ALTER DATABASE OPEN

Validamos el cambio correcto:

DGMGRL> show database emcdb;

Database - emcdb

  Role:               PHYSICAL STANDBY

  Intended State:     APPLY-ON

  Transport Lag:      0 seconds (computed 0 seconds ago)

  Apply Lag:          1 second (computed 0 seconds ago)

  Average Apply Rate: 5.00 KByte/s

  Real Time Query:    ON

  Instance(s):

    emcdb

Database Status:

SUCCESS

DGMGRL> show database emcdbr;         

Database - emcdbr

  Role:               PRIMARY

  Intended State:     TRANSPORT-ON

  Instance(s):

    emcdb

Database Status:

SUCCESS

DGMGRL> 

Con este tutorial, vamos a terminar de complementarlo, cuando se hace cambio  de rol, debe considerarse si las Apps lograran conectarse a un nuevo HOST, IP, datos de otro sitio, otro servicio, etc, etc; Oracle provee una solución para garantizar la menor intervención de DBA, de SYSADMIN, de NetworkAdmin, etc: Client failover connectivity .

De La documentacion:

Pre 11.2 Configuration:

Recordemos que en este ejemplo no tenemos SIHA ni Clusterware, entonces debemos considerar que el usuario el servicio debe manejarse solo por funcionamiento de la DB, y eso lo lograremos con un trigger en la misma DB.

La idea es, intervenir lo menos posible en un evento de switchover o Failover, esto es requerido, porque el servicio default de BD, de PBD, no funciona correctamente.

Crear en la primaria los servicios para ser usados por el respectivo rol:

+ On the current primary, create 2 services, one to connect to the primary (prim_db) and another (stby_db) to connect to the read only standby:

SQL> exec dbms_service.create_service('prim_db','prim_db');
SQL> exec dbms_service.create_service('stby_db','stby_db');

Iniciar el servicio en la primaria:

+ On the current primary, start the service that is needed to connect to primary:

SQL> exec dbms_service.start_service('prim_db');

+ Now, on the current primary, create the trigger to manage these services accordingly:

CREATE OR REPLACE TRIGGER startDgServices after startup on database

DECLARE

  db_role VARCHAR(30);

  db_open_mode VARCHAR(30);

BEGIN

  SELECT DATABASE_ROLE, OPEN_MODE INTO db_role, db_open_mode FROM V$DATABASE;

  IF db_role = 'PRIMARY' THEN DBMS_SERVICE.START_SERVICE('prim_db'); END IF;

  IF db_role = 'PHYSICAL STANDBY' AND db_open_mode LIKE 'READ ONLY%' THEN DBMS_SERVICE.START_SERVICE('stby_db'); END IF;

END;

/ 

El tnsnames a usar:

PRIM_DB =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (FAILOVER = ON)

      (LOAD_BALANCE = OFF)

      (ADDRESS = (PROTOCOL = TCP)(HOST = primary.oracle.com)(PORT = 1521))

      (ADDRESS = (PROTOCOL = TCP)(HOST = standby.oracle.com)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = prim_db)

    )

  )

  

STBY_DB =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (FAILOVER = ON)

      (LOAD_BALANCE = OFF)

       (ADDRESS = (PROTOCOL = TCP)(HOST = standby.oracle.com)(PORT = 1521))

       (ADDRESS = (PROTOCOL = TCP)(HOST = primary.oracle.com)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = stby_db)

    )

  )  


Complementaremos este tutorial, con un Video de las pruebas de switchover y un cliente conectandose para validar la cadena de conexión unificada sin intervención manual para ajustar dicha cadena.

Espero les sea de utilidad.

Saludos!!!

Como reducir el tamaño de un Tablespace UNDO y que no libera el espacio.

Raul Antonio Molina Alvarenga
12 de Abril de 2023
#OracleTIPSSV
#OracleACE
NOTA:REQUIERE INDISPONIBLIDAD.
1. Con la BD encendida, cambie el parametro  undo _management de  AUTO a  MANUAL ( Es estatico, requiere reinicio).
— alter system set undo_management=manual scope=spfile;
Consulte los segmentos de rollback que permanecen en el tablespace UNDO y que no permiten redimensionarlo a menos tamaño
1.1 SELECT SEGMENT_NAME,OWNER,TABLESPACE_NAME,STATUS FROM DBA_ROLLBACK_SEGS WHERE TABLESPACE_NAME LIKE ‘%UND%’;
SEGMENT_NAME       OWNER  TABLESPACE_NAME     STATUS

------------------------------ ------ ------------------------------ ----------------

_SYSSMU1_2287069710$       PUBLIC UNDOTBS1     ONLINE

_SYSSMU2_1428768168$       PUBLIC UNDOTBS1     ONLINE

_SYSSMU3_1956277333$       PUBLIC UNDOTBS1     ONLINE

_SYSSMU4_2809192227$       PUBLIC UNDOTBS1     ONLINE

_SYSSMU5_1081917160$       PUBLIC UNDOTBS1     ONLINE

_SYSSMU6_615989371$       PUBLIC UNDOTBS1     ONLINE

_SYSSMU7_3192789434$       PUBLIC UNDOTBS1     ONLINE

_SYSSMU8_1508326656$       PUBLIC UNDOTBS1     ONLINE

_SYSSMU9_4053710062$       PUBLIC UNDOTBS1     ONLINE

_SYSSMU10_1046413189$       PUBLIC UNDOTBS1     ONLINE



10 rows selected.
1.2 crear el pfile
   create pfile from spfile;
   shutdown immediate;
1.3 Modificar el init
   vi initBAODI.ora
2.Agregue la siguiente linea al archivo pfile:
_OFFLINE_ROLLBACK_SEGMENTS=(_SYSSMU10_1046413189$)  – agregar al final del archivo de init segun el listado del select anterior
( queda asi: )
*.undo_tablespace=’UNDOTBS1′
_OFFLINE_ROLLBACK_SEGMENTS=(_SYSSMU10_1046413189$)
3. Reinicie la BD con el pfile generado en el paso previo:
   startup nomount pfile=’/u01/app/oracle/product/11.1.0/db_1/dbs/initODI.ora’;
4. Borraremos el segmento de rolback o deshacer “_SYSSMU10_1046413189$”  se genera el script debe de quedar asi:drop rollback segment ” “_SYSSMU10_1046413189$”;
    SELECT ‘drop rollback segment “‘||SEGMENT_NAME||” FROM DBA_ROLLBACK_SEGS WHERE TABLESPACE_NAME LIKE ‘_SYSSMU10_1046413189$‘;
5. ejecutamos el script
6. Reiniciamos la BD
startup ;
7. Retornamos el parametro undo _management de  MANUAL a  AUTO
    alter system set undo_management=AUTO scope=spfile;
8. Reiniciamos la instancia
   shutdown immediate; y luego startup (normal)
Listo, para  nuestro ejemplo solo use un segmento de  rollback, pero puede crearse el listado de borrado de todos los segmentos de rollback necesarios.
Espero les sea de Utilidad
Saludos!!

Como monitorear Respaldos o Restauraciones de RMAN

Raúl Antonio Molina Alvarenga

10 de Abril de 2023

#OracleACE

#OracleTipsSV

A veces necesitamos ( lo más usual en la via de un DBA), monitorear una actividad de respaldo o restauración, esto porque siempre nos están preguntando, cual es el avance, como vamos, como va el respaldo.

Y a simple vista, responder a dicha pregunta no es tan fácil, especialmente si son restauraciones o respaldo de bases de datos de gran tamaño.

Pero los scripts construidos con el poderoso SQL nunca nos abandonan, en este caso traemos uno utilísimo (a mi modo de ver), que permite contestar de gran manera (es una aproximación) las preguntas planteadas arriba.

El query a usar, que es totalmente personalizable se basa en la session longops:

Pasted Graphic 3.png

El resultado seria similar a la siguiente salida, indicando, la Sesión o SID, la hora de inicio, el Porcentaje de avance, usualmente del Hilo o Sesión el restante en Segundos, Minutos y Horas, para aquello de los impacientes:

Pasted Graphic.png

Y la forma de Invocación:

Pasted Graphic 2.png

Espero les sea de Utilidad.

Saludos