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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| 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/ |
| ||||
| 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. |