By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,236 Members | 1,423 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,236 IT Pros & Developers. It's quick & easy.

Moving sequence objects?

P: n/a

Folks,

How can I copy sequence objects from one database to another?

I have a script that exports data from one database and loads it into another.
Some of the columns in the database are integer derived from sequences.

When I move the data I also want to copy/reset sequences in new database
so that they are same as in old database.

I don't think backup/restore would work because although table names are the
same, the database name and schema names are different.
Thanks.
--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.
Aug 15 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
My copy schema procedure in the COPY SCHEMA developerWorks article does
this sort of thing. You can cannibalize it for what you need. It's
written in SQL PL. Just search for my name on ibm.com

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 15 '06 #2

P: n/a
While stranded on information super highway Serge Rielau wrote:
My copy schema procedure in the COPY SCHEMA developerWorks article does
this sort of thing. You can cannibalize it for what you need. It's
written in SQL PL. Just search for my name on ibm.com

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/

Thanks, I will take a look at it.
--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.
Aug 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.