Question: I am getting these ORA-31684
errors on my import (impdp) job:
ORA-31684: Object
type SEQUENCE:"HSS"."LCM-MIGRATION_ID-SEQ" already exists
ORA-31684: Object type SEQUENCE:"HSS"."WKS_IDENTITY_SEQ"
already exists
How can I get Oracle to ignore these "already exists"
errors with the ORA-31684?
Answer: You are getting the
ORA-31684 errors because you have pre-created the user id in
the schema. Try using the
exclude=user to the impdp (or expdp command),
and this will ignore errors because user objects already
exist.
Most DBA's let the impdp create the user, but you may
want to change the tablespace names. If so, you can
use the remap_tablespace command (remap_tablespace=old_ts_name:new_ts_name)
For a ORA-31684 error on tables, you can use the
table_exists_action parameter which tells Oracle to
use the new DDL definitions instead of the DDL inside the
import data file.
TABLE_EXISTS_ACTION={SKIP | APPEND | TRUNCATE | REPLACE}
- Provides Data Pump Import with instructions to perform
when it finds a table in the target database with the same
name as a table contained in the input file.
TABLE_EXISTS_ACTION=SKIP - Existing tables
are bypassed if they already exist. No action is taken.
TABLE_EXISTS_ACTION=APPEND -Data Pump
Import will append rows to the existing table.
TABLE_EXISTS_ACTION=TRUNCATE - Data
Pump Import will truncate the existing table and load rows
from the source.
TABLE_EXISTS_ACTION=REPLACE - Existing tables will be
dropped, recreated and then loaded from the source.