Tag 11g

Rebuild All Indexes on a Schema in Oracle

spool index_rebuild.sql select ‘alter index ‘||owner||’.’||index_name ||’ rebuild online nologging;’ from dba_indexes where owner=upper(‘SAMPLE’); spool off  

Generate Excel and PDF in Oracle and Send Report by Email

First Install UTL_MAIL ### To install UTL_MAIL: [code language=”sql”] sqlplus sys/**** @$ORACLE_HOME/rdbms/admin/utlmail.sql @$ORACLE_HOME/rdbms/admin/prvtmail.plb [/code] ### Create a Reporting User ###…

Shell Script to Monitor Oracle Tablespace and Send Email Alert Only If Threshold Exceeds

export MMSG=/tmp/$$.mail export ADDR=”shadab@easyoradba.com” export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 export ORACLE_SID=orcl file=/tmp/${$}_`date +%Y%m%d` sqlplus -s “/as sysdba” << .eof > $file set pages…

Snapshots are not Backups

Very well explained article why Storage Snapshots are not the best way for backing up an Oracle database. http://www.oracle.com/technetwork/database/features/availability/rman-fra-snapshot-322251.html?utm_content=buffer67053&utm_medium=social&utm_source=facebook.com&utm_campaign=buffer

CREATE TABLE REPLICATION USING MATERIALIZED VIEWS ORACLE

CREATE TABLE REPLICATION USING MATERIALIZED VIEWS ————————————————- SOURCE TABLE : LOG_RECORD TARGET TABLE : LOG_RECORD_UPD We have a large table…