Schema

Script to create trace at database schema level by using trigger

Please create the below and disable or drop the trigger once completed.   create or replace trigger set_trace after logon on database begin if user not in (‘SYS’,’SYSTEM’,’SYSMAN’,’OLAPSYS’) then execute…

Read More

Table Alter Script by comparing 2 schema

Table of Contents Overview Technologies and Tools Used Use Case Architecture Screen Shot   1. Overview This document will be helpful to compares Prod and Dev schema and generates alter scripts…

Read More

Calculate Actual Size of All Tables in a Schema in Oracle

SELECT owner, table_name, TRUNC(sum(bytes)/1024/1024) MB FROM (SELECT segment_name table_name, owner, bytes FROM dba_segments WHERE segment_type in (‘TABLE’,’TABLE SUBPARTITION’,’TABLE PARTITION’) UNION ALL SELECT i.table_name, i.owner, s.bytes FROM dba_indexes i, dba_segments s…

Read More