Unix Technical Forum

Moving sequence objects?

This is a discussion on Moving sequence objects? within the DB2 forums, part of the Database Server Software category; --> Folks, How can I copy sequence objects from one database to another? I have a script that exports data ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 08:54 AM
Hemant Shah
 
Posts: n/a
Default Moving sequence objects?


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: NoJunkMailshah@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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 08:54 AM
Serge Rielau
 
Posts: n/a
Default Re: Moving sequence objects?

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/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 08:55 AM
Hemant Shah
 
Posts: n/a
Default Re: Moving sequence objects?

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: NoJunkMailshah@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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com