Professional Documents
Culture Documents
Assumption: ‘shell’ database is created and ready for data import. This target database is referred to as
WATS database in the document. Current/source database is referred as current database.
2. Copy dump file and log file to destination server (WATS server). From the WATS server, navigate
to the right directory (import directory) and run:
scp <user_id>@<wats_hostname>:<path>/<dbname>_current.dmp .
scp <user_id>@<wats_hostname>:<path>/<dbname>_current.log .
Example:
scp nlomigor@wdst4110.win.wellsfargo.com:/dbatemp/EXP/w053d/w053d_old.dmp .
scp nlomigor@wdst4110.win.wellsfargo.com:/dbatemp/EXP/w053d/w053d_old.log .
3. WATS database: password reset for user dbsnmp and system. Grants for dbsnmp (needed for
OEM prior to actual import). After running below script, make sure you can connect see the
database in Grid OEM.
Note: please update ‘junk’ file with updated system and dbsnmp credentials.
4. Current database:
a. Generate tablespace script
b. Replace create path for datafiles with '+DATA01' or '+DATA02'. You can also combine
datafiles to reduce complexity.
c. Run the modified create tablespace script on WATS database
d. Run AUDIT_DATA and AUDIT_INDEX01 create tablespace and move AUD$. Adjust
‘+DATA’ location depending where you store other database files.
begin
DBMS_AUDIT_MGMT.set_audit_trail_location(
audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,
audit_trail_location_value => 'AUDIT_DATA');
END;
Begin
DBMS_AUDIT_MGMT.set_audit_trail_location(
audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_FGA_STD,
audit_trail_location_value => 'AUDIT_DATA');
END;
spool gents.lst
DECLARE
l_str VARCHAR2(10);
BEGIN
END LOOP;
end if;
END LOOP;
END;
/
spool off
##############################################################################
5. Take the backup of WATS database (optional but strongly recommended, if import goes bad this
will allow quick recovery).
Example (please update path and file names prior to running it)
shutdown immediate
startup mount
shutdown immediate
startup mount
alter system enable restricted session;
drop database;
startup nomount
rman target /
cd $ORACLE_HOME/dbs
startup mount pfile=initw053d.ora
cd /dbaworkspace/w053d
full=y
directory=DATA_DIR
dumpfile=<dbname>_current.dmp
logfile=<dbname>_wats_import.log
job_name=053d_wats_import
parallel=4
EXCLUDE=TABLESPACE
EXCLUDE=DIRECTORY
EXCLUDE=SCHEMA:"='TSMSYS'"
EXCLUDE=SCHEMA:"='SYS'"
EXCLUDE=SCHEMA:"='SYSTEM'"
EXCLUDE=SCHEMA:"='WMSYS'"
EXCLUDE=SCHEMA:"='DBSNMP'"
EXCLUDE=SCHEMA:"='OUTLN'"
EXCLUDE=SCHEMA:"='SYSMAN'"
EXCLUDE=SCHEMA:"='ANONYMOUS'"
EXCLUDE=SCHEMA:"='CTXSYS'"
EXCLUDE=SCHEMA:"='DIP'"
EXCLUDE=SCHEMA:"='ORAMAN'"
EXCLUDE=SCHEMA:"='XDB'"
EXCLUDE=SCHEMA:"='ORACLE_OCM'"
EXCLUDE=SCHEMA:"='APPQOSSYS'"
Note: These are standard oracle users, we do want to exclude these to avoid
overwriting objects and creating errors in the import log file. Depending on database
components installed, DBA can exclude more users (query dba_users on shell/WATS
database).
c. Import data:
impdp parfile=import.par
d. Review the log file, send an email to Project Manager and primary DBA for validation.