I recently wanted to drop the indexes during a load and recreate after. There are several ways to do that, but this time since I had a schema export taken I wanted to extract from the dump file. Here are the scripts files: JDEPROD@proa1-/cloudfs/DBA/scripts$ cat expdp_JDE8_schemas.sh export NOW=$(date +”%F_%H%M%S”) export ORACLE_SID=JDEPROD export ORAENV_ASK=NO . oraenv echo “ORACLE HOME is: “$ORACLE_HOME mv /cloudfs/DBA/scripts/JDE82_schemas_exp_*.* /cloudfs/DBA/scripts/old_dump $ORACLE_HOME/bin/expdp \’/ … Continue reading Extract Index DDL from expdp
Using the SQL one can create a list of tables to pass as a parameter to export (exp). set heading off set pages 0 — create the list for a specific user SELECT DECODE( rownum, 1, ‘tables=(‘, ‘,’ ), owner || ‘.’ || table_name FROM dba_tables WHERE owner IN ( ‘SCOTT’ ) UNION ALL SELECT ‘)’, null FROM dual; Output: tables=( SCOTT.USERS , SCOTT.DEPT , … Continue reading How to create a list of tables for export using SELECT statement?