Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE(2):Import Export Sequences

RE(2):Import Export Sequences

From: Creach, Sylvan <sc00802%po1_at_COBE.COM>
Date: Tue, 5 Mar 1996 11:25:00 M
Message-Id: <9603041829.AA10923@alice.jcc.com>


Dale wrote:

>When I do an import to another copy of the same database, I expect my
>sequences to be updated
>to the values contained on the export data file. The sequences are not
>being imported. Only thing
>reflected on my import log are the imports of my tables.

>My import parfile is:
>user/password
>buffer=9956536
>FILE=/var/spool/ds3/expgpsdata.dmp
>ignore=y
>grants=n
>indexes=n
>rows=y
>log=/var/spool/ds3/impgpsdata.log
>full=y
>commit=y

>Am I overlooking something very obvious? I have been scratching my
head
>for a couple of days.
>Thanks in advance for any input.

>Regards,
>Dale Leake
>Graybar Electric Co.
>314/692-5763
>MIS!MISPO1!LeakeDG_at_graygend.attmail.com

If you didn't delete all sequences prior to the import, you could link to the exported
database and rebuild them with this script.

/* Reset sequences in the one instance to anothers values */

set pages 0

/* Create statements to drop the sequences */

spool c:\temp\sequence.lst

select 'drop sequence '||sequence_name||';' from all_sequences@<yourlink>
where sequence_owner = '<your_owner>'
and sequence_name in
(select sequence_name from all_sequences where sequence_owner = '<your_owner>');

/* Build statements to create the sequences */

select 'create sequence '||sequence_name||' start with '||last_number||';'
from all_sequences@<yourlink>
where sequence_owner = '<your_owner>'
and sequence_name in
(select sequence_name from all_sequences where sequence_owner = '<your_owner>');

/* Create statements to grant select access against the sequences */

select 'grant select on '||sequence_name||' to your_role1,your_role2...;' from all_sequences@<yourlink>
where sequence_owner = '<your_owner>'
and sequence_name in
(select sequence_name from all_sequences where sequence_owner = '<your_owner>');

spool off

start c:\temp\sequence.lst

Hope this helps.

Sylvan Creach, Database Administrator sc00802_at_po1.cobe.com Cobe Laboratories, Inc.

                                                  (303)239-2206
1185 Oak St                                              Platforms: HP-UX
9.04 (UNIX)
Lakewood, CO 80215-4407 USA                                 OSF1  3.2
 (UNIX)
Oracle Releases: 7.0.16.4, 7.1.6 and 7.2.3 Received on Mon Mar 04 1996 - 13:29:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US