ziggy
ziggy

Reputation: 15876

Import oracle *.dmp files and Oracle sequences during import

I exported a user's (USERA) schema to a dmp file. I then tried to import this schema into another user (USERB) as shown below

imp fromuser=USERA touser=USERB file=export.dmp log=export.log

It is currently importing but it initially produced "IMP-0015 - Statement failed because object exists" for all "Create Sequence" statements.

The userB user is a new user i just created so how can the sequence already exist? Is there something special with sequences? I run the import logged on as USERB.

Any ideas

ps DB is Oracle10G

Upvotes: 1

Views: 3259

Answers (3)

Gerrit
Gerrit

Reputation: 29

Sequences must be unique, database-wide. Think about it.

Upvotes: 0

Gary Myers
Gary Myers

Reputation: 35401

Did it try to create any public synonyms ? The only other thing I can think of was that it was specifically trying to create a "USERA.sequence_name", which smells like a bug.

Upvotes: 0

Rob van Laarhoven
Rob van Laarhoven

Reputation: 8905

check to see if they do exist in USERB schema and their date created compaired to the date created of other objects (tables)

SQL>select * from user_objects where object_type = 'SEQUENCE';

I suspect you ran imp before and it failed because off missing tablespaces. You created the tablepsaces and started imp again. But the sequences are created because they are not created in a tablespace.

P.S. Why don't you use impdp (datapump)?

Upvotes: 0

Related Questions