For archecker gurus: how do I restore a sequence using archecker ?
Posted in 2021
Eric Vercelletto asked how to restore a dropped sequence with archecker. Andreas Legner saw no sequence support and suggested restoring syssequences; Art Kagel said recreating it with CREATE SEQUENCE starting one above the last value is far faster. Eric used Andreas's idea and said it worked. Gerd Kaluzinski explained archecker fails with shared-memory connections because it needs TCP for multiple sessions.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: General Discussion
Hi Community, simple question today: in case a sequence has been dropped by mistake ( not me ;-) ) How do I recover a sequence from a backup without restoring the whole thing(instance) ? Can archecker do the trick ? I have seen that archecker handles tables, but what about sequences ? Any other way beyond ugly workarounds ? Thanks in advance Eric ------------------------------ [eric] [Vercelletto] [] [Founder] [kandooerp.org] [Pont l'Abbé] [France] [+33 626 52 50 68] Disclaimer: My own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. ------------------------------ #Informix
Don't think there's a provision for sequences in archecker. But, isn't all you really need the last value fetched from such sequence and used anywhere, for simply recreating the sequence manually? Then, provided that archecker/TLR doesn't forbid system table restore by name (into a differently named target table, of course), why not simply trying to restore your database's syssequences table? Now this is one for you to chew on over the weekend and letting us know the result ;-) BR, Andreas ------------------------------ Andreas Legner ------------------------------
Eric:
Probably but it will be FAR faster to just recreate it manually. All you need to know is the name of the sequence and the last value that it produced, then:
CREATE SEQUENCE my_seqINCREMENT BY 1 START WITH 123456
NOMINVALUE MAXVALUE 2337203685
CYCLE NOCACHE ORDER;
or
CREATE SEQUENCE my_seqINCREMENT BY 1 START WITH 123456
NOMINVALUE NOMAXVALUE
CYCLE NOCACHE ORDER;
Setting the START value one higher that the last value that was used from it.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
Cool one Andreas :-) I will let you know Thanks Eric ------------------------------ [eric] [Vercelletto] [] [Founder] [kandooerp.org] [Pont l'Abbé] [France] [+33 626 52 50 68] Disclaimer: My own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. ------------------------------
Well, finally I couldn't wait for the week end to do it: It works like a charm :-) Thanks bunches ------------------------------ [eric] [Vercelletto] [] [Founder] [kandooerp.org] [Pont l'Abbé] [France] [+33 626 52 50 68] Disclaimer: My own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. ------------------------------
Additional question about archecker: I found out that every time I want to run it with an ipcshm NETTYPE as $INFORMIXSERVER archecker fails. Is this expected ? If yes, why ? ------------------------------ [eric] [Vercelletto] [] [Founder] [kandooerp.org] [Pont l'Abbé] [France] [+33 626 52 50 68] Disclaimer: My own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. ------------------------------
ARCHECKER is only running on TCP Connections (even documented), because it starts multi sessions and this can not be established with a SHM Connection. Mit freundlichen Grüßen / Kind regards Gerd Kaluzinski DataOps Application Consultant IBM Cloud and Cognitive Software ------------------------------ IBM Deutschland Mies-van-der-Rohe-Straße 6 80807 München Phone: +49-175-228 1983 E-Mail: gerd.kaluzinski@de.ibm.com ------------------------------ IBM Deutschland GmbH Vorsitzender des Aufsichtsrats: Sebastian Krause Geschäftsführung: Gregor Pillen (Vorsitzender), Agnes Heftberger, Gabriele Schwarenthorer, Christian Noll, Nicole Reimer, Frank Theisen Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB 14562 / WEEE-Reg.-Nr. DE 99369940
That's a clear response Thank you Gerd! Eric Vercelletto Data Management Architect and Owner / Begooden IT Consulting KandooERP Founder and CTO IBM Champion 2013,2014,2015,2016,2017,2018,2019,2020 Tel: +33(0) 298 51 3210 Mob : +33(0)626 52 50 68 skype: begooden-it Google Hangout: eric.vercelletto@begooden-it.com Email: eric.vercelletto@begooden-it.com www : http://www.vercelletto.com www https://kandooerp.org