MERCADOS FINANCIEROS

lunes, 25 de enero de 2021

PRIVILEGIOS PLANES DE EJECUCION PLAN TABLE

 Rol SELECT_CATALOG_ROLE:


SQL> grant select_catalog_role to user1;

Grant succeeded.

Privilegio SELECT ANY DICTIONARY:

SQL> grant select any dictionary to user1;

Grant succeeded.

trcsess and tkprof.

 trcsess output=orcl_trace.txt service=orcl orcl_ora_4143.trc orcl_ora_4186.trc orcl_ora_4196.trc

$ tkprof orcl_trace.trc resultado.txt sys=no

$ tkprof orcl_trace.trc resultado.txt sys=no sort=execpu

tkprof orcl_trace.trc resultado.txt sys=no sort=exeela

tkprof orcl_ora_4196.trc resultado.txt sys=no

ACTIVAR TRACE 

EXEC  DBMS_MONITOR.session_trace_enable(waits=>TRUE, binds=>TRUE);
EXEC  DBMS_MONITOR.session_trace_disable;

VISTA VER TRACES DBA_EANBLED_TRACES


sábado, 23 de enero de 2021

RMAN LIST BACKUP ARCHIVELOG

 RMAN>


RMAN> list backup of archivelog logseq=120316;
RMAN> list backup of archivelog logseq 120316;
RMAN> list backup of archivelog sequence 120316;

To view backups of archivelog between two sequences:

RMAN> list backup of archivelog sequence between 120316 and 120317;
RMAN> list backup of archivelog from logseq 412593 until logseq 412656;


Use the SUMMARY directive to view only the backupsets affected:

RMAN> list backup of archivelog from logseq 412593 until logseq 412656 summary;
RMAN> list backup of archivelog sequence between 120316 and 120317 summary;


To view backups completed before a specific date:

RMAN> list backup completed before "to_date( '18.12.2009 18:00:00', 'DD.MM.YYYY HH24:MI:SS')";
RMAN> list backup of archivelog all summary completed before "to_date( '18.12.2009 18:00:00', 'DD.MM.YYYY HH24:MI:SS')";


To list archivelogs recognized by the controlfile:

list archivelog sequence between 110880 and 110881;

lunes, 18 de enero de 2021

VISTAS METRICAS ALERTAS ALERT_HISTORY

 VISTA

select * from dba_alert_history

select * from dba_outstanding_alerts

select * from dba_thresholds

select * from v$alert_types


REGISTROS TABLA FILTRADO X TABLESPACE

SQL> exec dbms_stats.gather_schema_stats('HR');

SQL> select owner,table_name,TABLESPACE_NAME,last_analyzed,num_rows from dba_tables

where owner='HR' 

and TABLESPACE_NAME='EXAMPLE'

order by num_rows desc




viernes, 15 de enero de 2021

AWR CONFIGURACION RETENTION

 

Snapshots and AWR Snapshot Retention

By default snapshots of the relevant data are taken every hour and retained for 7 days. The default values for these settings can be altered using the following procedure.

BEGIN
  DBMS_WORKLOAD_REPOSITORY.modify_snapshot_settings(
    retention => 43200,        -- Minutes (= 30 Days). Current value retained if NULL.
    interval  => 60);          -- Minutes. Current value retained if NULL.
END;
/
CONSULTAR VISTA DBA_HIST_SNAPSHOT
EXEC DBMS_WORKLOAD_REPOSITORY.create_snapshot;

BEGIN
  DBMS_WORKLOAD_REPOSITORY.drop_snapshot_range (
    low_snap_id  => 22, 
    high_snap_id => 32);
END;
/
execute dbms_workload_repository.DROP_SNAPSHOT_RANGE(1959,1966);

CREAR SNAPSHOT AWR

 CREAR UN SNAPSHOT TOMAR FOTO

SQL> exec  dbms_workload_repository.create_snapshot();

select SNAP_ID, BEGIN_INTERVAL_TIME, END_INTERVAL_TIME
from DBA_HIST_SNAPSHOT
order by 1;

SQL>execute dbms_workload_repository.DROP_SNAPSHOT_RANGE(1959,1966);