How to import only sequences?
I'm trying to import only sequences from dump file using Import Utility.
I ran the following command:
The problem is that I got errors of "CREATE TYPE ... already exists"
imp system/pwd file=exp.dmp log=/tmp/imp_seq.log from user=USER1 touser=USER2 rows=n grants=n indexes=n constraints=n ignore=y
Why the "ignore=y" does not work in this case?
How to overcome this problem?
Thanks in advance,
I've already read the IGNORE=Y in the documentation.
The option ignore=Y does not work when there are TYPES in the dump file.
Any more suggestions?
Thanks in advance,
What about creating the sequences with dynamic sql?
SELECT 'DROP SEQUENCE ' || sequence_name || ';' || CHR(10) ||
'SELECT ' ||
'''CREATE SEQUENCE ' || sequence_name ||
' INCREMENT BY ' || increment_by ||
' START WITH ''||' || sequence_name || '.NEXTVAL || ''' ||
' MINVALUE ' || MIN_VALUE ||
' MAXVALUE ' || MAX_VALUE ||
CASE cycle_flag WHEN 'N' THEN ' NOCYCLE ' ELSE ' CYCLE ' END ||
CASE order_flag WHEN 'N' THEN ' NOORDER ' ELSE ' ORDER ' END ||
' CACHE ' || CACHE_SIZE || ';'' FROM dual;' dyn_seq
ORDER BY sequence_name;
this space intentionally left blank
I know that I can create the sequences by dynamic sql.
I wanted to check if anyone experienced with importing sequences by exp/imp.
What do you mean ignore doesnt work. The import halts when it encounters an error?
The import does not halt,but all the errors invoke and appear on the screan.
The question is why import does not ignore when the schema contains types?
if ignore does not work your import would halt
If the user defined OBJECT TYPE exists, then imp will report an error even.
Originally Posted by nir_s
The error may look like:
IMP-00061: Warning: Object type "USR1"."POINTTYPE" already exists with a different identifier
"CREATE TYPE "POINTTYPE" TIMESTAMP '2005-12-28:16:42:11' OID '08FF481AE1B5C0"
"30E0435AA83432C030' as object ( x number , y number) ;"
Import terminated successfully with warnings.
It seems to be a bug in 9i.
Workaround is drop object type before imp.
I'm running on 10.1.0.3 ,so the bug probably wasn't fixed
I'll try to drop the TYPES before the import.
Click Here to Expand Forum to Full Width