tag:blogger.com,1999:blog-53078508352140392022024-03-22T01:06:41.532+00:00*-*-*!! Blog de Sofía Bueno !!*-*-*Este un blog que cambio de rumbo... antes era relacionado a "n" temas ahora será exclusivo para detallar todo lo que pude aprender en Oracle =)Sofía Buenohttp://www.blogger.com/profile/16232035430001528626noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-5307850835214039202.post-9884085226186316992012-05-08T03:50:00.001+01:002012-05-09T06:06:07.749+01:00MODO ARCHIVE Y MODO NO ARCHIVE<span style="font-family: "Trebuchet MS", sans-serif;">Nuestra base de datos en ORACLE puede correr de dos maneras diferentes en modo NOARCHIVE(default) y modo ARCHIVE. En el modo NOARCHIVE que es el menos recomendado los online redologs son sobreescritos y no son backupeados , en el caso del modo ARCHIVE todos los redo logs una vez llenos son backupeados a través del background process ARCn tomando el nombre de "archive redo logs" los cuales serán depositados en uno o mas ubicaciones del servidor, esto dependerá del valor de los parámetros LOG_ARCHIVE_DEST_1, LOG_ARCHIVE_DEST_2, ..., LOG_ARCHIVE_DEST_n .</span><br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">Al tener la base de datos en modo NOARCHIVE nos limitamos a tener que bajar la base de datos para poder backupearla, sin embargo en el caso de tenerla en modo ARCHIVE podemos backupearla online mientras nuestros usuarios están trabajando.</span><br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">Otra desventaja del tener la base de datos en modo NOARCHIVE es que solo podremos recuperar la base de datos hasta el momento en que el último backup fue realizado , en el caso de tenerla en modo ARCHIVE podemos recuperar hasta la última transacción comiteada.</span><br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">Para verificar si tu base de datos está en modo archive o no, ejecuta el siguiente query:</span><br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">select LOG_MODE from v$database;</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"></span><br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">LOG_MODE</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">-----------</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">NOARCHIVELOG</span><br />
<br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">* PASOS PARA CONFIGURAR TU BASE DE DATOS A MODO ARCHIVE:</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">Verificar que los siguientes parámetro estén seteados correctamente:</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"><br /></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">SQL> show parameter log_archive_dest_1 </span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"><br /></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">SQL> Alter system set log_archive_dest_1='location=/bk_archive_1/';</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"><br /></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"><br /></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">-- El siguiente parámetro no es dinámico por eso se utiliza "scope=spfile"</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"><br /></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">SQL> Alter system set log_archive_format='orcl_%r_%t_%s.arc' scope=spfile;</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"><br /></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">Una vez verificado estos parámetros podemos proceder a cambiar la BD a modo Archive</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"><br /></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">[oracle@pc dbs]$ sqlplus / as sysdba</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">SQL>shutdown immediate</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">SQL>startup mount</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">SQL> alter database archivelog;</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">SQL> alter database open;</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"><br /></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">Si deseas retornar tu base de datos a modo NOARCHIVE, deberás ejecutar el siguiente comando:</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"><br /></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">[oracle@pc dbs]$ sqlplus / as sysdba</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"> SQL>shutdown immediate</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"> SQL> startup mount</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"> SQL> alter database noarchivelog;</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">alter database noarchivelog</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">*</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">ERROR at line 1:</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">ORA-38774: cannot disable media recovery - flashback database is enabled</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">(Si como en mi caso te sale este error es porque tu bd estuvo previamente en modo archive y tenías habilitado el flashback database)</span><br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">Entonces debes ejecutar el siguiente query para desactivar el flashback </span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">SQL> alter database flashback off;</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">Database altered.</span><br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">-- Y luego </span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">SQL> alter database noarchivelog;</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;">Database altered.</span><br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">Para probar que has realizado correctamente la configuración , realiza el sgte. comando:</span><br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">SQL> alter system switch logfile;</span><br />
<span style="font-family: "Trebuchet MS", sans-serif;"></span><br />
<br />
<span style="font-family: "Trebuchet MS", sans-serif;">Listo!</span><br />
<br />
<br />
<br />
<br />
<br />Sofía Buenohttp://www.blogger.com/profile/04982269056216872870noreply@blogger.com0tag:blogger.com,1999:blog-5307850835214039202.post-60535069873098770022010-07-24T13:21:00.021+01:002010-07-24T16:32:00.487+01:00DECLARANDO VARIABLES PL/SQL<span style="font-family:verdana;">Las variables pueden ser usadas para almacenar data temporalmente, manipular valores almacenados y reusarlas dentro de los bloques. las variables pueden almacenar cualquier objeto PLSQL, como variables, tipos, cursores y subprogramas(Fx y Px).</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">Requerimientos para nombrar variables:</span><br /><span style="font-family:Verdana;">- Debe iniciar con una letra.</span><br /><span style="font-family:Verdana;">- Puede incluir letras y números</span><br /><span style="font-family:Verdana;">- Puede incluir caracteres especiales ($, _ y #)</span><br /><span style="font-family:Verdana;">- No puede ser mayor a 30 caracteres.</span><br /><span style="font-family:Verdana;">- No debe incluir palabras reservadas.</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">Como manejamos las variables en PLSQL?</span><br /><span style="font-family:Verdana;">- Las variables se deben declarar en la sección declarative, puedes declarar una variable asignando un valor inicial y se puede ademas colocar el constraint de NOT NULL .</span><br /><span style="font-family:Verdana;">- se usan y asignan nuevos valores en la sección ejecutable. </span><br /><span style="font-family:Verdana;">-Las variables se utilizan para pasar los parametros a un subprograma(Fx o Px) y ademá sirven para almacenar las respuesta de estos subprogramas.</span><br /><br /><span style="font-family:Verdana;">Sintaxis:</span><br /><span style="font-family:Verdana;">nombre_variable [constant] tipo_dato [not null] [:= valor_default]<span style="color:#cc0000;">; </span></span><br /><span style="font-family:Verdana;color:#cc0000;"></span><br /><span style="font-family:Verdana;">Ejemplo:</span><br /><span style="font-family:Verdana;">v_contador number(2) not null := 0;</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">Otros parametros de la declaración de variables:</span><br /><span style="font-family:Verdana;">CONSTANT: el valor de la variable no puede cambiar.</span><br /><span style="font-family:Verdana;">NOT NULL: es un constraint que indica que la variable debe tener un valor.</span><br /><span style="font-family:Verdana;">DEFAULT : es otra manera de dar un valor por defctoa una variable ( es igual a :=)</span><br /><br /><span style="font-family:Verdana;">En Oracle al imprimir textos literales que contienen el caracter de comilla simple (') se presentan algunos incovenientes lanzandonos un error (ORA-01756: la cadena entrecomillada no está terminada correctamente) , por lo cual oracle permite solucionar esto utilizando :</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">1. Dobles comillas como se muestra en el siguiente ejemplo:</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">Select 'Fathers''day'from dual;</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">y 2. es utilizar "Q o q" con un rango de delimitadores que indica que todo texto que se encuentre dentro de los delimitadores se considera texto literal , por ejemplo:</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">select q'[father's day ]' from dual;</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">Ambos ejemplos dan como resultado : Father's day sin ningún error en nuestra consola SQL*PLUS o la herramienta que utilices.</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">TIPOS DE VARIABLES:</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;"><strong>1. Variables PLSQL, pueden ser:</strong></span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">1.1Escalares, almacenan un solo valor y no tienen componentes internos (puede sre un valor booleano). Pueden ser de tipo:</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">- Char, varchar2, number(p,s), binary_integer, pls_integer, boolean, binary_float, binary_double.</span><br /><span style="font-family:Verdana;">- Date, timestamp, timestamp with time zone, timestamp with local time zone, interval year to month, interval year to second.</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;"><strong>*number(p,s): p , puede tomar valores d 1 hasta 38 y s, puede tomar valores de -84 hasta 127.</strong></span><br /><span style="font-family:Verdana;"><strong>*pls_integer: requiere menos almacenamiento y es más rápido que los tipo de datos NUMBER</strong></span><br /><span style="font-family:Verdana;"><strong>*boolean, almacena tipos de datos :false, true y null. puede utilizar operadores and, or y not .</strong></span><br /><strong><span style="font-family:Verdana;">*timestamp: almacena año, mes, día, hora, minutos , segundos y fracciones d segundos , la precisión de los segundos se encuentra en 6 seg. por default, pero puede ir desde 0 hasta 9 .[timestamp(x)]</span></strong><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">Ejemplo:</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">DECLARE</span><br /><span style="font-family:Verdana;">v_emp_job varchar(100);</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">1.2.Compuestas, tambien llamada coleccionts, pueden almacenar datos de tipo RECORD , TABLE, NESTED TABLE y VARRAY .</span><br /><span style="font-family:Verdana;"><strong>1.3.Referidas,</strong> son llamados pointers (punteros) , por que apuntan hacia una localización de almacenamiento.</span><br /><span style="font-family:Verdana;">1.4Large Object (LOB), almacena valores de tipos de datos LOB (CLOB, BLOLB, BFILE y NCLOB), son llamados locators(localizadores), por que especifican la localiación de LOBS que son almacenados fuera de las tablas.</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;"><strong>2. Variables NO PLSQL o Bind Variables or Host variables</strong></span><br /><span style="font-family:Verdana;">son creadas en un ambiente diferente a la sección DECLARE de un bloque pl/sql, son creadas con la palabra VARIABLE, son usadas en sentencias sql y PL/SQL . Pueden ser consutadas aun cuando el bloque PL/SQL ya se ejecutó. </span><br /><span style="font-family:Verdana;">Cuando declaras una bind variable number , no puedes indicar la precisión. Para coloarla dentro de un bloque plsql debes colocar :NOMBRE_VARIABLE</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">sintaxis:</span><br /><span style="font-family:Verdana;">VARIABLE nombre_variable number</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">sintaxis para imprimir una bind variable:</span><br /><span style="font-family:Verdana;">VARIABLE v_dato number</span><br /><span style="font-family:Verdana;">begin</span><br /><span style="font-family:Verdana;">select salary into :v_dato from employees where employee_id='8';</span><br /><span style="font-family:Verdana;">end;</span><br /><span style="font-family:Verdana;">/</span><br /><span style="font-family:Verdana;"></span><span style="font-family:verdana;">print v_dato</span><br /><br /><span style="font-family:Verdana;">Se puede utilizar:</span><br /><span style="font-family:Verdana;">SET AUTOPRINT ON, Para mostrar automaticamente el valor de la bind variable.</span><br /><br /><span style="font-family:Verdana;"><strong><em>Como declarar variables??</em></strong></span><br /><span style="font-family:Verdana;">- Cuando declaras una variable PL/SQL debemos evitar colocar el mismo nombre de la columna a la cual hacemos referencia .</span><br /><span style="font-family:Verdana;">- Cuando a una variable no se coloca un valor por defecto , este toma el valor de null.</span><br /><span style="font-family:Verdana;">- Dos variables pueden tener el mismo nombre sólo si son definidos en bloques diferentes.</span><br /><span style="font-family:Verdana;">- Si en la declaración de la variable has colocado al opción de NOT NULL, necesariamente debe tener un valor por default en la declaración.</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;"><strong>Declarar variables utilizando el atributo %TYPE </strong></span><br /><span style="font-family:Verdana;">Lo usamos para declarar una variable de cuerdo a una columna definida en la BD o otro variable declarada.</span><br /><span style="font-family:Verdana;">Para declarar un variable con atributo %type , se debe anteponer el nombre de la tabla de la base de datos y el nombre de la columna o el nombre de la variable declarada.</span><br /><span style="font-family:Verdana;">No es aplicable utilizar constraint NOT NULL para variables que utilizan %type</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">sintaxis:</span><br /><span style="font-family:Verdana;">nombre_variable table.column_name%type;</span><br /><span style="font-family:verdana;">nombre_variable nombre_variable%type;</span>Sofía Buenohttp://www.blogger.com/profile/04982269056216872870noreply@blogger.com0tag:blogger.com,1999:blog-5307850835214039202.post-79063228046602780532010-07-24T01:39:00.013+01:002010-07-24T13:19:07.280+01:00PLSQL (Procedural Language extension to SQL) Introducción<div><br /><br /><div><span style="font-family:verdana;color:#cccccc;"><strong>Beneficios de PL/SQL</strong></span><br /><span style="font-family:Verdana;"><strong>-</strong>PL/SQL permite la integración de procedimientos construidos con SQL.Permite especificar no sólo que hacer con un comando SQL , sino como hacerlo, dando un mejor control para su ejecución.</span><br /><span style="font-family:Verdana;">-Mejora la peformance, ya que a través de PLSQL podemos unir varias sentencias SQl en un solo programa, por lo tanto se envía un solo bloque a la BD en lugar de enviar una sentencia SQL a la vez.</span><br /><span style="font-family:Verdana;">-Modularized programa development: la unidad basica en un programa PL/SQL es el bloque.Los Bloques se pueden hallar secuencialmente o se pueden encontrar anidados.</span><br /><span style="font-family:Verdana;">Modularizar consiste en utilizar procedimientos, funciones, paquetes.</span><br /><span style="font-family:Verdana;">-Integración con herramientas, PL/SQL se encuentra integradoi con herramientas como Oracle Forms, Oracle Reports, otros.</span><br /><span style="font-family:Verdana;">-Portable: PLSQL corre en cualquiere servidor Oracle.</span><br /><span style="font-family:Verdana;">-Manejo de Excepciones, permite manejar eficientemente las excepeciones.</span><br /><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;color:#c0c0c0;"><strong>Estructura de un Bloque PL/SQL</strong></span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">Tiene 3 secciones :</span><br /><span style="font-family:Verdana;">1.DECLARATIVE </span><br /><strong><span style="font-family:Verdana;">DECLARE (opcional)</span></strong><br /><span style="font-family:Verdana;">-Permite declarar variables, crusores y excepciones</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">2.EXECUTABLE(inicia con begin y finaliza con end) esta sección necesariamente debe contener al menos una sentencia.</span><br /><strong><span style="font-family:Verdana;">BEGIN(mandatorio)</span></strong><br /><span style="font-family:Verdana;">- SQL y PL/SQL sentencias</span><br /><strong><span style="font-family:Verdana;">EXCEPTION(opcional)</span></strong><br /><span style="font-family:Verdana;">- Acciones a desarrollar cuando ocurren errores.</span><br /><strong><span style="font-family:Verdana;">END<span style="color:#ff0000;">;</span>(mandatorio)</span></strong><br /><strong><span style="font-family:Verdana;"></span></strong><br /><span style="font-family:Verdana;">3.EXCEPTION HANDLE(Manejo de excepciones) esta sección se encuentra anidada dentro de la sección ejecutable e inicia con la palabra EXCEPTION</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;"></span><br /><strong><span style="font-family:Verdana;color:#c0c0c0;">TIPOS DE BLOQUES</span></strong><br /><span style="font-family:Verdana;">Existen 3 tipos de bloques que comprenden un Programa PL/SQL</span><br /><span style="font-family:Verdana;">1.Anónimos</span><br /><span style="font-family:Verdana;">No tienen nombre y son compilados cada vez que la aplicación es ejecutada ya que estos bloques nose almacenan en la bd. </span><br /><span style="font-family:Verdana;">2.Subprogramas(</span><span style="font-family:Verdana;">Procedimientos & </span><span style="font-family:Verdana;">Funciones)</span><br /><span style="font-family:Verdana;">Tienen un nombre especifico y son almacenados en la BD, por ello podemos invocarlos cuando lo necesitemos. Los tipos son : procedimientos y funciones, los primeros desarrollan una acción y las funciones calculan y <strong>DEBEN</strong> retornan un valor.</span><br /><span style="font-family:Verdana;"><strong></span></strong><br /><strong><strong><span style="font-family:Verdana;"></span></strong><span style="font-family:verdana;">Ejemplos de un bloque anónimo</span></strong><br /></div><br /><div><strong><span style="font-family:Verdana;"></span></strong></div><br /><br /><div><span style="font-family:Verdana;">1. Habilitar la salida de mensajes en SQL* PLUS</span></div><br /><div><span style="font-family:verdana;"><em>set server output on</em></span></div><br /><div><span style="font-family:verdana;"></span></div><div><span style="font-family:verdana;">2. Utilizaremos el paquete de oracle para mostrar los mensajes:</span></div><br /><div><span style="font-family:verdana;"><em>DBMS_OUTPUT.PUT_LINE();</em></span></div><div><span style="font-family:verdana;"></span></div><div><span style="font-family:verdana;"></span> </div><div><span style="font-family:verdana;">3. detallamos un bloque anónimo :</span></div><span style="font-family:verdana;"><br /></span><div></div><div><span style="font-family:verdana;"></span></div><div><span style="font-family:verdana;"></span></div><div><span style="font-family:verdana;"></span></div><div><span style="font-family:verdana;"></span></div><div><span style="font-family:verdana;"></span></div><div><span style="font-family:verdana;"></span></div><span style="font-family:verdana;">Finalizamos el bloque con el "/" para proceder a su ejecución.</span><br /><div><strong><span style="font-family:verdana;"></span></strong></div><br /><br /><div><strong><span style="font-family:verdana;"></span></strong></div><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZp_t_4mzAmTdmw-6yFqSd5IZAZL7_hrxXgMly_VPbOoJWISi-CMweN4kTq7DZ1Y1JCfsNmn248QX2OjNcuOR64HoRxBmcXaJ1JOY9OxFfQPrpVDPB7bfU8rD60yfZN6HhGw-pQJFdUYk/s1600/img1_23072010.jpg"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 548px; DISPLAY: block; HEIGHT: 270px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5497306024605938530" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZp_t_4mzAmTdmw-6yFqSd5IZAZL7_hrxXgMly_VPbOoJWISi-CMweN4kTq7DZ1Y1JCfsNmn248QX2OjNcuOR64HoRxBmcXaJ1JOY9OxFfQPrpVDPB7bfU8rD60yfZN6HhGw-pQJFdUYk/s400/img1_23072010.jpg" /></a><br /><div><strong><br /><strong></strong><br /></div></strong></div>Sofía Buenohttp://www.blogger.com/profile/04982269056216872870noreply@blogger.com0tag:blogger.com,1999:blog-5307850835214039202.post-44495803696888651842009-10-14T02:25:00.008+01:002009-10-14T09:19:04.486+01:00USING THE DATA RECOVERY ADVISOR (DRA)The DRA is a new tool introduced in oracle 11G, that automatically diagnose database failures and determines the appropriate recovery options. in addition, it can perform the recovery after the DBA confirms the operation. DRA can proactively check for failures, before the database process detects corruption and signals an error.<div><br /></div><div>DRA may be used with Em or RMAN command line. DRA supports only single -instance databases(no RAC environments ).</div><div><br /></div><div>Support workbench tool is invoked from the software and support tab of the EM, and shows the failures in the Database . when you clicking the launch recovery advisor button, you can invoke DRA. </div><div><br /></div><div>The health monitor (Hm) tool in the oracle 11G proactively monitors the health of the database . it assesses data failures and reports to the DRA , that assigns the priority based on the failure.</div><div><br /></div><div>failure chcks in the database(DB) can be reactive or proactive. when an error occurs in the db , reactive checks are automatically executed. the following are examples of data failures where the Dra suggest reapir options:</div><div><b>- Missing or corrupted datafiles</b></div><div><b>- datafiles with incorrect OS permissions</b></div><div><b>- offline tablespaces</b></div><div><b>- corrupt index entry or dictinonary entry</b></div><div><b>- i/o failures</b></div><div><b>- number of open files exceeded </b></div><div><b><br /></b></div><div><b><br /></b></div><div><br /></div><div><br /></div><div><br /></div><div> </div>Sofía Buenohttp://www.blogger.com/profile/16232035430001528626noreply@blogger.com0tag:blogger.com,1999:blog-5307850835214039202.post-62045747337809636392009-10-14T01:56:00.008+01:002009-10-14T03:04:13.650+01:00RECUPERANDO BD EN ORACLE - cuando pierdes UN control file(resumen sybex)Losing one of the multiplexed control file immediately aborts the instance.<div>1- shutdown abort</div><div>2- copy one of the good copies of the control file to the location of the corrupted or missings control file.</div><div>if the corrupted Cfile resided on a failed disk , copy it to another suitable location and update the initialization parameter to update the cfile reference or you can remove the reference from this initialization parameter until you find a suitable location.</div><div>you must have at least two control files in your Db.</div><div>3-start the instance with startup.</div><div><br /></div><div>you´ll change the initialization parameter <b>control_file</b> using the alter system set scope=spfile when the instance is started in no mount mode.</div>Sofía Buenohttp://www.blogger.com/profile/16232035430001528626noreply@blogger.com0tag:blogger.com,1999:blog-5307850835214039202.post-54265785645969474872008-02-14T11:28:00.004+00:002008-02-14T22:16:34.928+00:00Quien dijo q la Seguridad Informática es aburrida!!!!<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK9R2JiB2zLxXGydzs0pd5rIofduZkukDqFldGSajTsXYFQE7NGEZxKgm16gjtUT7daIuEwp8p9ie6YWn53aYtgx-71AAdddYkEYmGkoGEGEAG6mb2EjZIjFNs-3Q-9v2VUHKQWHWPe0U/s1600-h/dogbert.gif"><img id="BLOGGER_PHOTO_ID_5166962843940123442" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK9R2JiB2zLxXGydzs0pd5rIofduZkukDqFldGSajTsXYFQE7NGEZxKgm16gjtUT7daIuEwp8p9ie6YWn53aYtgx-71AAdddYkEYmGkoGEGEAG6mb2EjZIjFNs-3Q-9v2VUHKQWHWPe0U/s400/dogbert.gif" border="0" /></a><span style="font-size:85%;"> Traducción:<br />Dogbert el consultor de seguridad.<br />Si ven a alguien sin su identificación…<br />… desnúdenlo y regístrenlo, confisquen su billetera, y enciérrenlo en el closet de limpieza hasta que muera de hambre!<br />PHB (jefe de pelo puntiagudo): Eso me parece un poco extremo.<br />Dogbert: Estás a un minuto de vivir de agua de trapeador.</span><br /><span style="font-size:85%;"></span><br /><span style="font-size:85%;"></span><br /><span style="font-size:85%;">De hecho que la identificación de las personas es muy importante en una organización, no vamos a permitir que un cracker ingrese a un centro de cómputo, ¿cierto? Aunque claro, la identificación debe ser hecha con buenos modales y respeto por la persona, nada que ver con nuestro malévolo Dogbert ....</span><br /><span style="font-size:85%;"></span><br /><span style="font-size:85%;">=) </span>Sofía Buenohttp://www.blogger.com/profile/16232035430001528626noreply@blogger.com0