Question

We have a shell script that we use to import a dump file into a database. This script literally calls impdp utility. But before doing so, it disable the Archivelog on the target database in order to disable generation of archived redolog files during this operation.

Recently, it became impossible for us to shutdown database before the impdp (technical requirement). This way the archivelog mode can't be disabled :-(

My question is , how can we still manage to decrease the number of generated archived redolog files while importing even when the database is in archivelog mode?

I tried to put all the permanent tablespaces in NOLOGGING Mode, but i still got a lot of archived redolog files generated ....

Was it helpful?

Solution 3

Finally i found a solution to my problem . First of all i found the reason why setting tabespaces in NOLOGGING mode doesn't have any impact. In fact, when inspecting the dump file, i found that the tables are created with LOGGING mode. this override the settings on the tablespace.

The solution is to import in two phases :

  • First phase : import only the metadata (impdp CONTENT=METADATA_ONLY .... )
  • Set all the tables/indexes to NOLOGGING mode
  • Second phase : import only data (impdp CONTENT=DATA_ONLY .... )
  • Set all the tables/indexes to LOGGING mode

OTHER TIPS

With Oracle 12c you can disable the use of the redo logs (see Oracle Documentation)

impdp [...] transform=disable_archive_logging:y

This article from "Burleson" gives you an comprehensive overview.

Disabling every index (by disabling all the primary/unique constraints and and ALTERing all the indexes as UNUSABLE) can help. You could then rebuild all the unusable indexes in NOLOGGING mode.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top