GPO ( Grupo de Profissionais Oracle )
A maior comunidade Oracle do Brasil !

Author: eskinazi

bd 0

Expdp e Impdp dicas

Criar o diretório do backup via expdp com o usuário do backup export ORACLE_SID= <instance_name> sqlplus /nolog connect / as sysdba create or replace directory EXP_DIR_FULL as ‘/bkp_servidor/<instance_name>/’; grant read  on  directory EXP_DIR_FULL  to backup; grant write on  directory EXP_DIR_FULL ...

bd 0

Compactar e Descompactar

Essas dicas são uteis. Compactar tar cvf <nome_do_arquivo> <diretorio_inicial> exemplo: tar cvf xx oracle zip <nome_do_arquivo> <lista de arquivos> A <lista de arquivos> não tem virgula (espaço em branco). exemplo : zip trace_log emctl.log emoms.trc.4 emoms.trc.3 emoms.log emoms.trc.2 Decompactar tar...

bd 0

Monitorar flash_recovery_area em ambiente ASM

Na crontab coloque dessa forma: #flash_recovery_area 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /u01/sisbd/flash_recovery_area/flash_SID.sh 1>/u01/sisbd/flash_recovery_area/flash_SID.sh.sucesso 2>/u01/sisbd/flash_recovery_area/flash_SID.sh.erro cat  /u01/sisbd/flash_recovery_area/flash_SID.sh cd /u01/sisbd/flash_recovery_area ./flash_asm.sh <ORACLE_SID> ./flash_asm.sh petronav cat flash_asm.sh #/bin/bash servidor=`hostname -s` . /home/oracle/.bash_profile cd /u01/sisbd/flash_recovery_area export ORAENV_ASK=’NO’ export ORACLE_SID=$1 . oraenv sqlplus -s /nolog...

bd 0

JOBS

set linesize 200 define off echo on — — Analisar Jobs — COLUMN LOG_USER FORMAT A10 COLUMN PRIV_USER FORMAT A10 COLUMN SCHEMA_USER FORMAT A10 COLUMN FAILURES FORMAT 99 COLUMN WHAT FORMAT A70 SELECT JOB, BROKEN, LAST_DATE, LOG_USER, PRIV_USER, SCHEMA_USER ,FAILURES...

bd 2

RECRIAR TABLESPACE TEMPORARIA

O tamanho do segmento sempre será calculado pelo tamanho db_block_size da base. select value from v$parameter where name=’db_block_size’; VALUE —— 8192 calculo PARA OLTP select (1024*1024)+8192*2 from dual; (1024*1024)+8192*2 —————— 1064960 1 – SELECT property_value FROM database_properties WHERE property_name =...

bd 0

Como mover system e sysaux NO ASM

Nesse caso o ORACLE_SID=sbkp . oraenv sbkp sqlplus /nolog connect / as sysdba FILE_NAME                                                                                            TABLESPACE_NAME —————————————————————————————————- —————————— +DG_SBKP_DADOS/sbkp/datafile/users.259.856878829                                                    USERS +DG_SBKP_DADOS/sbkp/datafile/undotbs1.258.856878829                                               UNDOTBS1 +DG_SBKP_DADOS/sbkp/datafile/ts_128k_01d.266.857464319                                          TS_128K_01D +DG_SBKP_FLASH/asm/datafile/sysaux.266.860497425                                                     SYSAUX +DG_SBKP_FLASH/asm/datafile/system.265.860497491                                                     SYSTEM shutdown immediate .oraenv +ASM asmcmd cp +DG_SBKP_FLASH/asm/datafile/sysaux.266.860497425  +DG_SBKP_DADOS/sbkp/datafile/sysaux copying +DG_SBKP_FLASH/asm/datafile/sysaux.266.860497425 -> +DG_SBKP_DADOS/sbkp/datafile/sysaux asmcmd...

bd 0

MONITORAR TABLESPACES

Para você gerenciar tablespace de forma eficiente é necessário fazer: 1) Apenas 1 datafile com AUTOEXTEND 2) Apenas esse datafile irá ser monitorado. Quanto de espaço ainda tem? — MONITORACAO 1 — ============= — — ALERTA AS TABLESPACES QUE TEM...