More DBA job interview questions and answers at
http://dba.fyicenter.com/Interview-Questions/
(Continued from previous question...)
Oracle DBA Checklist - Weekly Procedures - datatype.sql
-- datatype.sql
--
-- To check datatype consistency between two environments
SELECT
table_name,
column_name,
data_type,
data_length,
data_precision,
data_scale
,
nullable
FROM all_tab_columns -- first environment
WHERE owner = '&OWNER'
MINUS
SELECT
table_name,
column_name,
data_type,
data_length,
data_precision,
data_scale,
nullable
FROM all_tab_columns@&my_db_link -- second environment
WHERE owner = '&OWNER2'
order by table_name, column_name
(Continued on next question...)