› Fóruns › Banco de dados Oracle › Comparar tabelas de Instancias diferentes › Comparar tabelas de Instancias diferentes
Achei um script que compara a estrutura de duas tabelas
select a.table_name tabela,a.column_name coluna,
a.data_type tipo_a,
a.data_length tamanho_a,
a.data_precision precisao_a,
b.data_type tipo_b,
b.data_length tamanho_b,
b.data_precision precisao_b
from dba_tab_cols a inner join dba_tab_cols b
on a.table_name=b.table_name and a.column_name=b.column_name
where (a.data_type b.data_type
or a.data_length b.data_length
or a.data_precision b.data_precision)
and a.owner = ‘BASE_OFICIAL’ –Informe aqui o nome da base oficial
and b.owner=’BASE_TESTES’ –informe aqui o nome da base de testes
order by 1,2,3,4
Mas como fazer para ler tabelas de schemas diferentes?