newguy
newguy

Reputation: 5986

Can I manually change the dump file created by imp tool of Oracle?

I have encountered a problem in importing the dump file to a new database. When importing the dump file it requires a new tablespace which does not exist in the database. To create the tablespace I need to hijack some scripts which is readonly.For this reason it is complicated to export the table structure through imp tool of Oracle so my colleage changed the dump file manually and it is able to be imported. Is it OK to change the dump file manually in order to import the file if it is the quickest way?

Upvotes: 2

Views: 3498

Answers (3)

erbsock
erbsock

Reputation: 1217

if you create the user with a default tablespace that is a tablespace that exists, you can import with rows=n and ignore=y and that should bring the objects in for you into that tablespace.

Upvotes: 0

Gary Myers
Gary Myers

Reputation: 35401

As an alternative, get a dummy database and

  1. create the tablespace/schema.
  2. Do the import there with ROWS=N
  3. ALTER TABLE ... MOVE .... to put the tables into the desired tablespace
  4. Export tables (structures) from there
  5. import corrected structures
  6. Import the data with IGNORE=Y so that the data can be imported over the existing structures.

Upvotes: 2

M.J.
M.J.

Reputation: 16676

if are comfortable to change the dump file manually then it is fine, keeping that you are aware of the the complete structure of the .dmp file.

i will suggest u to use data pump as it remaps the table space of the existing schema with the new one. and performance wise data pump is much faster then normal dump.

Upvotes: 2

Related Questions