Note scripts can also be found in attachment @ http://support.dbvisit.com/hc/en-us/articles/220551807-Data-Discovery-Scripts-Replicate
The following script can help determine if the tables in your schema contain unsupported datatypes:
No Format |
---|
Prompt Specify owner for the tables that you want to replicate Prompt Specify table_name(s) for the tables that you want to replicate. % for all. column owner format A45 set linesize 200 set pagesize 5000 ttitle left '***** Unsupported Data Types *****' skip 2 btitle off spool unsupported.txt select owner, table_name, column_name, data_type from sys.dba_tab_cols where data_type not in ( 'NUMBER', 'FLOAT', 'VARCHAR2', 'VARCHAR', 'CHAR', 'NCHAR', 'NVARCHAR2', 'LONG', 'LONG RAW', 'DATE', 'RAW', 'BFILE', 'CLOB', 'BLOB', 'NCLOB' ) and data_type not like 'INTERVAL%' and data_type not like 'TIMESTAMP%' and owner not in ( 'XDB','SYS','SYSTEM','SYSMAN','WMSYS','OLAPSYS','MDSYS','APEX_030200','FLOWS_FILES', 'EXFSYS','APPQOSSYS','CTXSYS','ORDDATA','OUTLN','DBSNMP','ORDSYS','DBVREP','APEX_040200','LBACSYS') and table_name not in (select view_name from dba_views) order by owner,table_name; spool off |
...
No Format |
---|
-- Run on Source & post imported target db spool deldelete_cascade_constraints.txt column owner format A35 set pagesize 4000 set linesize 132 select owner, constraint_name, delete_rule,status FROM dba_constraints where delete_rule = 'CASCADE' and owner not in ( 'XDB','SYS','SYSTEM','SYSMAN','WMSYS','OLAPSYS','MDSYS','APEX_030200','FLOWS_FILES', 'EXFSYS','APPQOSSYS','CTXSYS','ORDDATA','OUTLN','DBSNMP','ORDSYS','DBVREP','APEX_040200','LBACSYS') order by 1,2; spool off |
...
No Format |
---|
-- Run on Source as a pre-check REM **************************** REM *** Encryption REM **************************** spool list_encrypt.txt ttitle left '***** Encryption Assessment *****' skip 2 btitle off select * from dict where lower(table_name) like '%encrypted%'; select owner, table_name, COLUMN_NAME, ENCRYPTION_ALG from DBA_ENCRYPTED_COLUMNS where owner not in ('XDB','SYS','SYSTEM','SYSMAN','WMSYS','OLAPSYS','MDSYS','APEX_030200','FLOWS_FILES', 'EXFSYS','APPQOSSYS','CTXSYS','ORDDATA','OUTLN','DBSNMP','ORDSYS','DBVREP', 'APEX_040200','LBACSYS') order by 1,2,3; spool off |
Check for Transparent Data Encryptions (TDE)
No Format |
---|
-- Run on Source as a pre-check
REM ************************************
REM *** Check TDE if parameter found to be TRUE in init/pfile
REM ************************************
column timendate new_value spooltime noprint
set echo off
set linesize 132
set pagesize 50000
btitle off
ttitle off
prompt ***********************************************************************
prompt ** Check if TDE Feature is enabled, OK if query returns not found errors
select SYS_CONTEXT('USERENV', 'DB_NAME')||'_'||'chk_tde'||'_'||to_char(sysdate,'mmddyyyy') timeNdate from dual;
spool &spooltime-output.txt
set echo on
SELECT KEYSTORE_TYPE FROM V$ENCRYPTION_KEYS;
SELECT STATUS FROM V$ENCRYPTION_WALLET;
SELECT TABLESPACE_NAME, ENCRYPTED FROM DBA_TABLESPACES;
SELECT * FROM DBA_ENCRYPTED_COLUMNS
order by owner, table_name, column_name;
set echo off
spool off
|