MERCADOS FINANCIEROS

viernes, 30 de noviembre de 2018

CONFIGURE EXCLUDE FOR TABLESPACE

RMAN> CONFIGURE EXCLUDE FOR TABLESPACE EXAMPLE;

RMAN> SHOW ALL;

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE EXCLUDE FOR TABLESPACE 'EXAMPLE';
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/db_1/dbs/snapcf_orcl.f'; # default

RMAN>


RMAN> CONFIGURE EXCLUDE FOR TABLESPACE EXAMPLE CLEAR;

Tablespace EXAMPLE will be included in future whole database backups
old RMAN configuration parameters are successfully deleted

RMAN> show all;

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/db_1/dbs/snapcf_orcl.f'; # default

RMAN>


RMAN> BACKUP DATABASE NOEXCLUDE;


lunes, 26 de noviembre de 2018

SESIONES ESPERANDO

select
a.inst_id,
a.sid,
a.serial#,
a.username,
a.status,
a.osuser,
a.process,
a.machine,
a.program,
a.type,
a.sql_id,
a.client_info,
a.logon_time,
b.PLSQL_EXEC_TIME,
b.rows_processed,
b.optimizer_cost,
b.cpu_time,
b.elapsed_time/1000000 as ELAPSED_TIME_SECS,
b.elapsed_time/60000000 as ELAPSED_TIME_MINS,
b.elapsed_time/3600000000 as ELAPSED_TIME_HRS,
b.SQL_TEXT,
'ALTER SYSTEM KILL SESSION ' || CHR(39) ||sid || ',' || serial# || CHR(39) || ' IMMEDIATE; '
from
gv$session a,
gv$sql b
where
a.sql_id = b.sql_id
AND b.elapsed_time/3600000000 > 1
order by elapsed_time desc;