Este es un tip bastante fácil y útil.
Cuando se escribe una sentencia en sqlplus y se necesita corregir o modificar, se debe volver a escribir la sentencia completa.
sqlplus cuenta con un editor interno, el cual es posible de configurar defininiendo la variable EDITOR.
Por default sqlplus no cuenta con ningún editor en particular:
SQL> define
DEFINE _DATE = "13-MAR-13" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "clarope" (CHAR)
DEFINE _USER = "TAMP" (CHAR)
DEFINE _PRIVILEGE = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1002000500" (CHAR)
DEFINE _EDITOR = "ed" (CHAR)
DEFINE _O_VERSION = "Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options" (CHAR)
DEFINE _O_RELEASE = "1002000500" (CHAR)
miércoles, 13 de marzo de 2013
miércoles, 30 de enero de 2013
ORACLE-DBA-DataPump-Taller 1: respaldo full BD.
Conceptualmente datapump es una herramienta del motor de oracle (RDBMS) que existe a partir de la versión 10g. Su utilidad es la de generar respaldos de bases de datos y se inventó para reemplazar al comando exp/imp, el standar en las versiones anteriores del motor de datos.
La versatilidad de DataPump comprende muchos beneficios, siendo los más interesantes:
La versatilidad de DataPump comprende muchos beneficios, siendo los más interesantes:
- Respaldos de instancias completas (respaldo full DB)
- Respaldos de esquemas completos (respaldo full esquema)
- Respaldos de esquema con algunas tablas (respaldo selectivo de esquema).
LINUX-RHEL-checklist server.
lista de comandos para evaluar el estado de un server RHEL.
Disk usage.
# df -al
Memory information.
# free
Network information.
# ifconfig -a
Installed Modules information.
#lsmod
Currently mounted filesystems/shares.
# mount
Process tree
# pstree
System uptime information.
# uptime
Services running in different runlevels.
# chkconfig --list
Generates hardware configuration report. (Not sure whether it is present in RH9)
# /usr/share/rhn/up2date_client/hardware.py
Installed RPMS.
# rpm -q --all
List of currently open files.
# lsof -b +M -n -l
Attached USB devices.
# lsusb
Routing table information.
# route -n
Partition table
# fdisk -l
System hostname
# hostname
IP Tables information
# iptables -t filter -nvL
Listing PCI Devices
# lspci
# lspci -n
# lspci -nv
# lspci -nvv
fuente:
http://h30499.www3.hp.com/t5/System-Administration/prtdiag-type-command-in-linux/td-p/3865609
Disk usage.
# df -al
Memory information.
# free
Network information.
# ifconfig -a
Installed Modules information.
#lsmod
Currently mounted filesystems/shares.
# mount
Process tree
# pstree
System uptime information.
# uptime
Services running in different runlevels.
# chkconfig --list
Generates hardware configuration report. (Not sure whether it is present in RH9)
# /usr/share/rhn/up2date_client/hardware.py
Installed RPMS.
# rpm -q --all
List of currently open files.
# lsof -b +M -n -l
Attached USB devices.
# lsusb
Routing table information.
# route -n
Partition table
# fdisk -l
System hostname
# hostname
IP Tables information
# iptables -t filter -nvL
Listing PCI Devices
# lspci
# lspci -n
# lspci -nv
# lspci -nvv
fuente:
http://h30499.www3.hp.com/t5/System-Administration/prtdiag-type-command-in-linux/td-p/3865609
lunes, 21 de enero de 2013
ORACLE-DBA: error ORA-16014: log 6 sequence# 156 not archived, no available destinations
el error ORA-16014: log 6 sequence# 156 not archived, no available destinations se produce porque los archivos de archivelog han llenado el espacio disponible por el motor de datos para este tipo de archivos.
SQL> startup;
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 2083368 bytes
Variable Size 184550872 bytes
Database Buffers 92274688 bytes
Redo Buffers 6303744 bytes
Database mounted.
ORA-16014: log 6 sequence# 156 not archived, no available destinations
ORA-00312: online log 6 thread 1: '/psva/oradata/psva/redo06.log'
SQL>
SQL> startup;
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 2083368 bytes
Variable Size 184550872 bytes
Database Buffers 92274688 bytes
Redo Buffers 6303744 bytes
Database mounted.
ORA-16014: log 6 sequence# 156 not archived, no available destinations
ORA-00312: online log 6 thread 1: '/psva/oradata/psva/redo06.log'
SQL>
viernes, 28 de diciembre de 2012
ORACLE-DBA: open failed for members of log group 1 of thread 1
accidentalmente he borrado los archivos redolog de la instancia de BD.
los archivos redolog se ubican en la siguiente ruta:
$ORACLE_BASE/oradata/instancia/redo*.log
la consecuencia del borrado de estos archivos es que la bd no puede levantarse correctamente:
SQL> startup;
ORACLE instance started.
Total System Global Area 1660944384 bytes
Fixed Size 1274020 bytes
Variable Size 570429276 bytes
Database Buffers 1073741824 bytes
Redo Buffers 15499264 bytes
Database mounted.
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/ruta/redo01.log'
Para corregir el error "ORA-00313: open failed for members of log group 1 of thread 1"
los archivos redolog se ubican en la siguiente ruta:
$ORACLE_BASE/oradata/instancia/redo*.log
la consecuencia del borrado de estos archivos es que la bd no puede levantarse correctamente:
SQL> startup;
ORACLE instance started.
Total System Global Area 1660944384 bytes
Fixed Size 1274020 bytes
Variable Size 570429276 bytes
Database Buffers 1073741824 bytes
Redo Buffers 15499264 bytes
Database mounted.
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/ruta/redo01.log'
Para corregir el error "ORA-00313: open failed for members of log group 1 of thread 1"
miércoles, 8 de agosto de 2012
ORACLE-DBA-conocer los parches y versiones instaladas en el motor BD (opatch)
Cuando se hace una verificación de los productos instalados sobre un servidor, es necesario conocer la versión del motor de Oracle, además de los parches instalados y sus versiones.
Para eso existe el utilitario OPatch que entre sus funciones lista los parches instalados en la BD.
Como usuario oracle proceder como sigue:
$ cd $ORACLE_HOME/OPatch
$./opatch lsinventory
El resultado es el siguiente:
Para eso existe el utilitario OPatch que entre sus funciones lista los parches instalados en la BD.
Como usuario oracle proceder como sigue:
$ cd $ORACLE_HOME/OPatch
$./opatch lsinventory
El resultado es el siguiente:
viernes, 20 de julio de 2012
LINUX-UBU: conocer la versión de ubuntu.
Dos formas de conocer la versión de ubuntu a través de la consola.
[gcepeda@annunakis ~]$ lsb_release -a
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
[gcepeda@annunakis ~]$ cat /etc/issue
Ubuntu 11.04 \n \l
[gcepeda@annunakis ~]$
[gcepeda@annunakis ~]$ lsb_release -a
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
[gcepeda@annunakis ~]$ cat /etc/issue
Ubuntu 11.04 \n \l
[gcepeda@annunakis ~]$
Suscribirse a:
Entradas (Atom)