Day 5: Configuring ARCHIVELOG Mode

Posted by Paola Pullas | Posted in Administración, Base de Datos, Oracle | Posted on 05-09-2010

Tags: , , , , , ,

0

Before to review this tutorial review this links:

Configuring the Flash Recovery Area

The flash recovery area is a storage location for all recovery related files. All files that are needed to completely recover a database from a media failure are part of the flash recovery area. Some files in the flash recovery area are: control files, redo logs, archived logs, backup pieces, image copies, flashback logs and foreign archived logs.

By allocating a storage location and unifying related recovery files within a specific area, the Oracle database server relieves the database administrator from having to manage the disk files created by these components.

When setting up a flash recovery area, you choose a directory, file system or Automatic Storage Management disk group to hold the files, and set a disk quota for the maximum space to be used for all files stored in the flash recovery area.

The flash recovery area should be on a separate disk from the working area. Keeping the flash recovery area on the same disk as the working area exposes you to loss of both your live database files and backups in the event of a disk failure.

You can execute the next command from SQL*Plus in order to verify the actual configuration of flash recovery area:

  • show parameter db_recovery_file_dest

If you want to change this configuration you can execute the alter system command from SQL*Plus to set the values that are more appropriate for your environment:

  • alter system set db_recovery_file_dest='/u01/app/oracle/flash_recovery_area' scope=both;
  • alter system set db_recovery_file_dest_size='2G' scope=both;

The first parameter shows you the physical directory of the flash recovery area and the second parameter shows you the quota or size assigned for this area. Keep in mind that quota should be bigger enough to keep the recovery files.

Another method to verify the flash recovery area configuration is using Enterprise Manager Dbconsole going to Availability –> Recovery Settings like I show you in the next screens.

Configuring the Archivelog Mode from SQL*Plus

The firs step is make a clean shutdown of your database using any of the next commands from SQL*Plus:

  • shutdown immediate;
  • shutdown normal;
  • shutdown transactional;

Then you should use the next commands from SQL*Plus in order to mount the database, configure the archivelog mode and finally open the database:

  • alter database mount;
  • alter database archivelog;
  • alter database open;

Next I will verify if my configuration is working properly with the next commands:

  • select log_mode from v$database;
  • alter system archive log current;

In the first screen the command verify the log mode of the database and in the second screen I am forcing the archiving process in the database:

Configuring the Archivelog Mode from Enterprise Manager Dbconsole

Login in Enterprise Manager Dbconsole page.

Go to Recovery Settings link under Availability tab.

Go to Media Recovery section and check the ARCHIVED Mode option then click in Apply button.

A Confirmation screen will appear after click in Apply button, then click in Yes button.

The next screen will appear and you should fill the text boxes with the os and database users information, in my case the os user is oracle and the database user with SYSDBA privilege is sys, then click in OK button.

The next screens will appear after this operation. You should wait a few minutes until the process finished. In order to know that this complete successfully you should refresh your browser until the login screen appears.

Author: Paola Pullas
Do you need to buy support?: Contact me at pp@refundation.com

If you think that this tutorial helped you. Make a donation to this initiative. We appreciate your support. Also your donation can help me to buy more coffee or Red Bull.


Remember: Database Administrator Responsabilities

Posted by Paola Pullas | Posted in Administración, Base de Datos, Oracle, Recuerda | Posted on 05-09-2010

Tags: , , ,

0

A database administrator’s responsibilities can include the following tasks:

  • Installing and upgrading the Oracle Database server and application tools.

  • Allocating system storage and planning future storage requirements for the database system.

  • Creating primary database storage structures (tablespaces) after application developers have designed an application.

  • Creating primary objects (tables, views, indexes) once application developers have designed an application.

  • Modifying the database structure, as necessary, from information given by application developers.

  • Enrolling users and maintaining system security.

  • Ensuring compliance with Oracle license agreements.

  • Controlling and monitoring user access to the database.

  • Monitoring and optimizing the performance of the database.

  • Planning for backup and recovery of database information.

  • Maintaining archived data on tape.

  • Backing up and restoring the database.

  • Contacting Oracle for technical support.

Ref.: http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/dba001.htm#i1006120

Day 4: How to submit SQL commands to Oracle database

Posted by Paola Pullas | Posted in Administración, Base de Datos, Oracle | Posted on 05-09-2010

Tags: , , , , , , ,

0

There are different tools to access Oracle database in order to submit SQL commands. In this section I will show you 3 Oracle tools that you have with no extra cost. Before to review this tutorial review this links:

SQL*Plus

The firs tool is SQL*Plus, this is a command-line interface tool to access to Oracle database. You use SQL*Plus to execute many administrative tasks for example: start up and shut down the database, set database initialization parameters, create and manage users, create and alter database objects (such as tables and indexes), and more. In addition SQL*Plus can be used to insert and update data and run SQL queries.

The format to establish a connection using SQL*Plus is:

  • CONN[ECT] [logon] [AS {SYSOPER | SYSDBA}]
  • {username | /}[@connect_identifier]

In the next screen I will show you some examples in order to gain access to database from SQL*Plus.

  • sqlplus /nolog

  • connect sys/oracle as sysdba

  • conn sys/oracle@eva as sysdba

  • conn system/oracle

  • connect system/oracle@eva

  • connect system/oracle as sysdba

  • conn system/oracle as sysoper

  • conn hr/hr

  • conn hr/hr@eva

Enterprise Manager Dbconsole

Oracle Enterprise Manager Dbconsole is an intuitive graphical interface to administer the database.

In order to gain access to Enterprise Manager you should be a user defined like administrator in the application dbconsole. In the next screen I will show you the users that can login in the Oracle Enterprise Manager Dbconsole. In order to acess this screen you should login in Enterprise Manager Dbconsole like sys user and then go to Setup link in the right upper corner of the application:

In the next screens I will show you some examples in order to login in Enterprise Manager Dbconsole. The url to access have the format https://server_ip:em_port/em. If you don’t know the port to access the application you can find this in the file portlist.ini located in $ORACLE_HOME/install:

SQL Developer

Start the application with sqldeveloper command from a operating system terminal, and next create a connection in the graphical interface like I show you in the next screens:

Author: Paola Pullas
Do you need to buy support?: Contact me at pp@refundation.com

If you think that this tutorial helped you. Make a donation to this initiative. We appreciate your support. Also your donation can help me to buy more coffee or Red Bull.


Instalación de Oracle Enterprise Manager Grid Control

Posted by Paola Pullas | Posted in Administración | Posted on 06-02-2008

1

La presente guía de instalación está dedicada para mis estudiantes de la clase de Oracle Data Guard 10g. La versión de software de Oracle Enteprise Manager Grid Control en la cual está basada ésta guía es la versión 10g Release 2 (10.2.0.1).

Revisión de los Prerequisitos de Instalación
El primer paso para iniciar el proceso de instalación es revisar los prerequisitos de instalación que podrán ser encontrados en el siguiente link: http://download.oracle.com/docs/cd/B16240_01/doc/install.102/b31198/toc.htm

Requerimientos de hardware
A continuación se resumen algunas consideraciones que deben ser tomadas en cuenta para la instalación del producto:
Espacio en disco: Se requieren al menos 4.5Gb de espacio disponible para la instalación de Enterprise Manager Grid Control Using a New Database y 2.5Gb de espacio disponible para la instalación de Enterprise Manager Grid Control Using an Existing Database.
Memoria:Se requiere al menos 1Gb de memoria disponible y al menos 2Gb de memoria disponible para la operación del producto.

Requerimientos de software
Sistema operativo: Para el caso específico de Solaris se requiere cualquiera de las siguientes versiones: Solaris 8 Update 7 o superior, Solaris 9 Update 6 o superior o Solaris 10.
Requerimientos de paquetes: El sistema deberá estar corriendo las siguientes versiones de paquetes o superiores: SUNWarc, SUNWbtool, SUNWhea, SUNWlibm, SUNWlibms, SUNWsprot, SUNWsprox, SUNWtoo, SUNWi1of, SUNWxwfnt.
Requerimientos de parches y parámetros de kernel: Deberán ser consultados en la guía dependiendo de la versión de Solaris que se tenga instalada en el equipo.

Instalación del producto
A continuación se detallan los pasos a seguir para la instalación del producto:

1. Levantar el Oracle Universal Installer con el utilitario runInstaller desde el cd/dvd del producto. En este caso se lo haría de la siguiente manera:

/cdrom/disk1/runInstaller

Image1 Oracle Enterprise Manager Grid Control

2. Se desplegará la pantalla Oracle Enterprise Manager Grid Control 10gR2 Installation, en donde en este caso se seleccionará la opción Enterprise Manager 10g Grid Control Using a New Database y a continuación se hará clic en el botón Next.

Image2 Oracle Enterprise Manager Grid Control

3. Se desplegará la pantalla Oracle Enterprise Manager Grid Control 10gR2 Installation en donde se colocará la ruta para la realización de la instalación (ORACLE_HOME) y se hará clic en el botón Next. En este caso se ha utilizado el siguiente valor para el ORACLE_HOME: /oracle/product/10.2.0/EM_1.

Image3 Oracle Enterprise Manager Grid Control

4. Se desplegará la pantalla Oracle Universal Installer: Product-Specific Prerequisite Checks en donde se indica las revisiones que hace el Oracle Universal Installer para la configuración de productos específicos. En el caso de nuestro proceso de instalación la pantalla no muestra ningún error o alerta que impida continuar con el proceso. A continuación se debe hacer clic en el botón Next.

Image4 Oracle Enterprise Manager Grid Control

Image5 Oracle Enterprise Manager Grid Control

5. Se desplegará la pantalla Oracle Universal Installer: Specify Configuration en donde se debe ingresar los datos relacionados con la base de datos que cumplirá la función de repositorio de Oracle Enteprise Manager Grid Control y adicionalmente se deberá colocar el nombre del grupo de sistema operativo que permitirá cumplir las funciones tanto de Oracle Database Administrator como de Oracle Database Operator. En este caso se ha procedido a colocar la siguiente información y a continuación se hará clic en el botón Next.

Image6 Oracle Enterprise Manager Grid Control

6. Se desplegará la pantalla Oracle Universal Installer: Specify Optional Configuration en donde se deberá colocar información como: correo electrónico y servidor SMTP para envío de notificaciones de correo electrónico, usuario y clave para el acceso a Metalink e información relacionada con el proxy de la compañía para lograr la conectividad a través del firewall. A continuación se hará clic en el botón Next.

Image7 Oracle Enterprise Manager Grid Control

7. Se desplegará la pantalla Oracle Universal Installer: Specify Security Options en donde se debe colocar las claves para el Management Service Security que se será utilizada por los agentes para comunicarse de manera segura con el servicio de administración y las claves para los usuarios SYS, SYSTEM, DBSNMP y SYSMAN de la base de datos que se utilizará como repositorio de administración.

Image8 Oracle Enterprise Manager Grid Control

8. Se desplegará la pantalla Oracle Universal Installer: Privileged Operating Groups en donde se deberá colocar el grupo de sistema operativo correspondiente para el Database Administrator (OSDBA) y Database Operator (OSOPER), esto permite que se puedan asignar los privilegios SYSDBA y SYSOPER requeridos para la creación de la base de datos. Luego hacer clic en el botón Next.

Image9 Oracle Enterprise Manager Grid Control

9. Se desplegará la pantalla Oracle Universal Installer: Summary que muestra un resumen del proceso de instalación, en donde se debe hacer clic en el botón Install.

Image10 Oracle Enterprise Manager Grid Control

10. Se desplegará la pantall Oracle Universal Installer: Install que muestra el progreso del proceso de instalación.

Image11 Oracle Enterprise Manager Grid Control

11. Una vez finalizado el proceso de instalación del software se desplegará una pantalla solicitando la ejecución del script allroot.sh el cual deberá ser ejecutado como usuario root en el sistema operativo. Una vez finalizado este proceso con éxito se hará clic en el botón OK.

Image12 Oracle Enterprise Manager Grid Control

Image13 Oracle Enterprise Manager Grid Control

12. Se desplegará la pantalla Oracle Universal Installer: Configuration Assistants en donde se muestra el progreso del proceso de configuración de todos los componentes.

Image14 Oracle Enterprise Manager Grid Control

Image15 Oracle Enterprise Manager Grid Control

Image16 Oracle Enterprise Manager Grid Control

13. Finalmente se desplegará la pantalla Oracle Universal Installer: End of Installation en donde se indica que la instalación ha culminado con éxito y se hará clic en el botón Exit.

Image17 Oracle Enterprise Manager Grid Control

14. Una vez finalizado el proceso de instalación se deberá comprobar el acceso a través una ventana del explorador en este caso en la ruta: http://servidor:4889/em.

Image18 Oracle Enterprise Manager Grid Control

Autor: Paola Pullas