miércoles, 18 de junio de 2014

Tiempos de Respuestas para Oracle

T. de respuesta para Discos:

NSTANCE_NUMBER BEGIN_TIME       average(ms) maxval(ms)
--------------- ---------------- ----------- ----------
              2 18-JUN-14 00:59                            ,94       2,08
              2 18-JUN-14 01:59                            ,93       2,46
              2 18-JUN-14 03:00                          1,37        2,4
              2 18-JUN-14 03:59                          1,51       5,01
              2 18-JUN-14 04:59                          1,27       5,36
              2 18-JUN-14 05:59                            ,94       1,72
              2 18-JUN-14 06:59                          1,35        5,6
              2 18-JUN-14 07:59                          1,83       2,72
              2 18-JUN-14 09:00                          2,04       5,59
              2 18-JUN-14 09:59                          1,82       2,43


T, respuestas SQL:


INSTANCE_NUMBER BEGIN_TI HORA     METRIC_NAME               Tiempo Respuesta(s)
--------------- -------- -------- ------------------------- -------------------
              2 18/06/14 00       SQL Response Time (secs)                   ,1
              2 18/06/14 01       SQL Response Time (secs)                  ,05
              2 18/06/14 02       SQL Response Time (secs)                  ,06
              2 18/06/14 03       SQL Response Time (secs)                 2,47
              2 18/06/14 04       SQL Response Time (secs)                 1,27
              2 18/06/14 05       SQL Response Time (secs)                 1,15
              2 18/06/14 06       SQL Response Time (secs)                 2,08
              2 18/06/14 07       SQL Response Time (secs)                  ,07
              2 18/06/14 08       SQL Response Time (secs)                  ,06
              2 18/06/14 09       SQL Response Time (secs)                  ,06
              2 18/06/14 10       SQL Response Time (secs)                  ,06


T. Respuesta TRansacciones:

NSTANCE_NUMBER BEGIN_TI HORA METRIC_NAME                    Tiempo Respuesta(s)
--------------- -------- ---- ------------------------------ -------------------
              2 18/06/14 00   Response Time Per Txn (secs)                  2,37
              2 18/06/14 01   Response Time Per Txn (secs)                  1,31
              2 18/06/14 02   Response Time Per Txn (secs)                  1,65
              2 18/06/14 03   Response Time Per Txn (secs)                 68,58
              2 18/06/14 04   Response Time Per Txn (secs)                 33,41
              2 18/06/14 05   Response Time Per Txn (secs)                 32,25
              2 18/06/14 06   Response Time Per Txn (secs)                 73,39
              2 18/06/14 07   Response Time Per Txn (secs)                  1,59
              2 18/06/14 08   Response Time Per Txn (secs)                  1,39
              2 18/06/14 09   Response Time Per Txn (secs)                  1,48
              2 18/06/14 10   Response Time Per Txn (secs)                  1,44

TPS:

INSTANCE_NUMBER    SNAP_ID DATETIME         Commits/s Rollbacks/s       TX/s
--------------- ---------- --------------- ---------- ----------- ----------
              2      16989 18-06-14 01           7,42           0       7,42
              2      16990 18-06-14 02           5,06           0       5,06
              2      16991 18-06-14 03           4,04           0       4,04
              2      16992 18-06-14 04           3,54           0       3,55
              2      16993 18-06-14 05            3,6           0        3,6
              2      16994 18-06-14 06            4,4           0        4,4
              2      16995 18-06-14 07           8,06           0       8,06
              2      16996 18-06-14 08          18,95           0      18,95
              2      16997 18-06-14 09          33,87           0      33,87
              2      16998 18-06-14 10          37,73           0      37,73

OBS:

siempre debemos estar monitoreando estas variables en nuestro entorno Oracle

domingo, 15 de junio de 2014

RMAN (recovery table)

1-
backup realizados:





SCOTT@orcl12> select * from emp
  2  ;

     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7839 KING       PRESIDENT            17-NOV-81       5000                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20

     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
      7934 MILLER     CLERK           7782 23-JAN-82       1300                    10

14 rows selected.

2- Drop table

SCOTT@orcl12> drop table emp;

Table dropped.

Elapsed: 00:00:00.04

3- Recovery table

oel-2:orcl12:/home/oracle12/rman/$ cat rec_table.rmn
RECOVER TABLE SCOTT.EMP
#until time "to_date('07/27/2013 05:00','mm-dd-yyyy hh24:mi')"
until sequence 843
 AUXILIARY DESTINATION '/tmp/oracle/recover'
 DATAPUMP DESTINATION '/tmp/recover/dumpfiles'
 REMAP TABLE 'SCOTT'.'EMP':'EMP_RECOVERED';


oel-2:orcl12:/home/oracle12/rman/$ rman target / @rec_table.rmn


.....
Oracle instance shut down

Performing import of tables...
   IMPDP> Master table "SYS"."TSPITR_IMP_qcwj_ddfx" successfully loaded/unloaded
   IMPDP> Starting "SYS"."TSPITR_IMP_qcwj_ddfx":  
   IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
   IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
   IMPDP> . . imported "SCOTT"."EMP_RECOVERED"                     8.757 KB      14 rows
   IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
   IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
   IMPDP> Job "SYS"."TSPITR_IMP_qcwj_ddfx" successfully completed at Sun Jun 15 10:30:23 2014 elapsed 0 00:01:18
Import completed


Removing automatic instance
Automatic instance removed
auxiliary instance file /tmp/oracle/recover/ORCL12/datafile/o1_mf_temp_9svc2qoo_.tmp deleted
auxiliary instance file /tmp/oracle/recover/QCWJ_PITR_ORCL12/onlinelog/o1_mf_9_9svc556f_.log deleted
auxiliary instance file /tmp/oracle/recover/QCWJ_PITR_ORCL12/onlinelog/o1_mf_8_9svc53pd_.log deleted
auxiliary instance file /tmp/oracle/recover/QCWJ_PITR_ORCL12/onlinelog/o1_mf_7_9svc50cg_.log deleted
auxiliary instance file /tmp/oracle/recover/QCWJ_PITR_ORCL12/onlinelog/o1_mf_6_9svc4w0k_.log deleted
auxiliary instance file /tmp/oracle/recover/QCWJ_PITR_ORCL12/onlinelog/o1_mf_5_9svc4s35_.log deleted
auxiliary instance file /tmp/oracle/recover/QCWJ_PITR_ORCL12/onlinelog/o1_mf_4_9svc4qo7_.log deleted
auxiliary instance file /tmp/oracle/recover/QCWJ_PITR_ORCL12/datafile/o1_mf_users_9svc4cpo_.dbf deleted
auxiliary instance file /tmp/oracle/recover/ORCL12/datafile/o1_mf_sysaux_9svbxqsq_.dbf deleted
auxiliary instance file /tmp/oracle/recover/ORCL12/datafile/o1_mf_undotbs1_9svbxqt2_.dbf deleted
auxiliary instance file /tmp/oracle/recover/ORCL12/datafile/o1_mf_system_9svbxqt0_.dbf deleted
auxiliary instance file /tmp/oracle/recover/ORCL12/controlfile/o1_mf_9svbxbpc_.ctl deleted
auxiliary instance file tspitr_qcwj_53892.dmp deleted
Finished recover at 15-JUN-14

Recovery Manager complete.

SCOTT@orcl12> select * from EMP_RECOVERED 
  2  ;

     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7839 KING       PRESIDENT            17-NOV-81       5000                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20

     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
      7934 MILLER     CLERK           7782 23-JAN-82       1300                    10

14 rows selected.

FIN...
Obsevaciones:
- Se requiere al menos 30% de espacio del backup para generar la instancia auxiliar
- se requiere al menos el mismo SGA de la instancia actual.

viernes, 6 de junio de 2014

Arquitectura  ORACLE 12

1-Arquitectura de Directorios UNIX


2- Arquitectura puggable Database


3- Arquitectura de Procesos