ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Administración I - Ejercicios Módulo 1

chrisalejPráctica o problema7 de Julio de 2014

5.293 Palabras (22 Páginas)486 Visitas

Página 1 de 22

Administración I - Ejercicios Módulo 1

Esta práctica podrá realizarse tanto con SQL*PLUS como con SQL Developer. Antes de comenzar a realizar los ejercicios hay que conectarse a la base de datos con usuario system/manager@coh

1.1 Buscar los archivos de la base de datos

1) Consultar donde se encuentran los controlfiles:

Select name from v$controlfile;

2) Consultar donde se encuentran los redo log files:

Select member from v$logfile;

3) Consultar donde se encuentran los data files y cual es su tamaño en MB :

Select name, bytes/1024/1024 from v$datafile;

1.2 Investigar las estructuras de memoria de la Instancia

1) Consultar el tamaño actual , mínimo y máximo de los components de la SGA que pueden cambiar su tamaño dinámicamente:

select COMPONENT,CURRENT_SIZE,MIN_SIZE,MAX_SIZE

from v$sga_dynamic_components;

2) Determinar cual ha sido la máxima memoria asignada para la PGA y el tamaño actual de la misma:

select name,value from v$pgastat

where name in ('maximum PGA allocated','total PGA allocated');

1.3 Investigar los procesos Background

1) Determinar los procesos que están corriendo en la base actualmente:

select program from v$session order by program;

select program from v$process order by program;

2) En una terminal de Linux ejecutar este comando para ver los procesos corriendo de la base coh desde el sistema operativo

ps –ef|grep coh

1.4 Investigar estructura lógica de la Base de Datos

1) Crear una tabla llamada tabla1 con el siguiente script:

create table tabla1 (c1 varchar2(10))

tablespace SYSTEM;

2) Verificar que el segment tabla reside en el tablespace SYSTEM, el tamaño del extent que lo conformathe size of the extent, en que file_id se encuentra el extent y en que nro de bloque empieza el extent dentro del datafile:

select tablespace_name, extent_id, bytes, file_id, block_id

from dba_extents where owner='SYSTEM' and segment_name='TABLA1';

3) Identificar el nombre del datafile sustituyendo con el valor de file_id obtenido en la query anterior:

select name from v$datafile where file#=&file_id;

4) Crear una tabla llamada tabla2 con el siguiente script:

create table tabla2 (c1 varchar2(10))

tablespace SYSTEM

storage(minextents 4);

5) Verificar extents, en que file_id se encuentra cada extent y en que nro de bloque empieza cada extent dentro del datafile:

select tablespace_name, extent_id, bytes, file_id, block_id

from dba_extents where owner='SYSTEM' and segment_name='TABLA2';

6) Verificar el tamaño de bloque del tablespace SYSTEM:

select block_size from dba_tablespaces where tablespace_name='SYSTEM'

Administración I - Ejercicios Módulo 2

2. Instalación de Sofware Oracle 11g release1

2.1. Acceder al tutorial de instalación y chequear cada uno de los pasos:

http://st-curriculum.oracle.com/obe/db/11g/r1/prod/install/dbinst/dbinst.htm

Download Software

• Download the following software. Oracle Database 11g Release 2 (11.2) Software

• Unpack Files Unzip the files.

>unzip linux.x64_11gR2_database_1of2.zip

>unzip linux.x64_11gR2_database_2of2.zip

• Hosts File

The "/etc/hosts" file must contain a fully qualified name for the server.

<IP-address> <fully-qualified-machine-name> <machine-name>

192.168.15.12 zeus.tecninfolabs.com.co zeus

>vim /etc/hosts

• Set Kernel Parameters

Oracle recommend the following minimum parameter settings.

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048586

>/sbin/sysctl -a | grep <param-name>

Add or amend the following lines in the "/etc/sysctl.conf" file.

• Run the following command to change the current kernel parameters.

>/sbin/sysctl -p

• Add the following lines to the "/etc/security/limits.conf" file.

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

• Add the following line to the "/etc/pam.d/login" file, if it does not already exist.

session required pam_limits.so

• Start the Firewall administration dialog (System > Administration > Firewall).

• Click the "Disable" button followed by the apply button on the toolbar, then close the dialog.

• Disable secure linux by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.

SELINUX=disabled

• Install library

binutils-2.17.50.0.6-2.el5

>yum install binutils

compat-libstdc++-33-3.2.3-61

>yum install compat-libstdc++-33

>yum install compat-libstdc++-33.i686

elfutils-libelf-0.125-3.el5

elfutils-libelf-devel-0.125

>yum install elfutils-libelf

>yum install elfutils-libelf-devel

glibc-2.5-12

glibc-common-2.5-12

>yum install gcc

>yum install gcc-c++

>yum install glibc

>yum install glibc.i686

glibc-devel-2.5-12

>yum install glibc-common

>yum install glibc-devel

>yum install glibc-devel.i686

glibc-headers-2.5-12

gcc-4.1.1-52

gcc-c++-4.1.1-52

>yum install glibc-headers

>yum install ksh

libaio-0.3.106

libaio-devel-0.3.106

>yum install libaio

>yum install libaio.i686

>yum install libaio-devel

>yum install libaio-devel.i686

libgcc-4.1.1-52

>yum install libgcc

>yum install libgcc.i686

libstdc++-4.1.1

libstdc++-devel-4.1.1-52.e15

yum install libstdc++

yum install libstdc++.i686

yum install libstdc++-devel

make-3.81-1.1

>yum install make

numactl-devel-0.9.8.i386

>yum install numactl-devel

sysstat-7.0.0

>yum install sysstat

• Oracle ODBC Drivers

You should install ODBC Driver Manager for UNIX. You can download and install the Driver Manager from the following URL:

http://www.unixodbc.org

unixODBC-2.2.11 (32 bit) or later

unixODBC-devel-2.2.11 (32 bit) or later

>yum install unixODBC

>yum install unixODBC.i686

>yum install unixODBC-devel

>yum install unixODBC-devel.i686

• Creating Required Operating System Groups and Users

To determine whether the oinstall group exists, enter the following command:

# more /etc/oraInst.loc

>groupadd oinstall

>groupadd dba

>groupadd oper

>groupadd asmadmin

useradd -g oinstall -G dba,oper,asmadmin oracle

passwd oracle

• Create the directories in which the Oracle software will be installed.

>mkdir -p /u01/app/oracle/product/11.2.0/db_1

>chown -R oracle:oinstall /u01

>chmod -R 775 /u01

• Login as root and issue the following command.

>yum install xhost

Step 1: Edit the /etc/hosts file and give IP Address,FQDN name and Server name

#vi /etc/hosts

ipaddress_of_system server1.sharadchhetri.com server1

Step 2: Edit /etc/sysconfig/network file ,give HOSTNAME as machine name i.e server1

# vi /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=server1

Step 3: Restart the network service.

/etc/init.d/network restart

Now check the hostname and FQDN with command called “hostname” and “hostname -f” respectively.

#hostname

server1

#hostname -f

server1.sharadchhetri.com

yum -y groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts"

>gdm

>xhost +<machine-name>

Edit the "/etc/redhat-release" file replacing the

...

Descargar como (para miembros actualizados) txt (43 Kb)
Leer 21 páginas más »
Disponible sólo en Clubensayos.com