This is a discussion on ontape -l roll-forward of many logs within the Informix forums, part of the Database Server Software category; --> IDS v7.31 UD8 on solaris I'm doing a logical log rollforward. The logs are backed up by an ontape ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| IDS v7.31 UD8 on solaris I'm doing a logical log rollforward. The logs are backed up by an ontape -a process, to disk, and are about 10m each in size. It's all working fine if i roll forward one log then in a seprate screen move the next one into position. But this is a pain in the arse: I have hundreds to do and want to do them in one fell swoop. But if I cat all 100 into one large file ontape bombs out almost immediately asking if I have more logs. Similarly if I run onlog on the 1concatenation of 100 logs it reads just the first one and ask me if I have any more. Why is this happening? I've changed LTAPESIZE in the ONCONFIG file on the restored server from 10m to 2g but it's made no difference. SOMETHING is teling ontape/onlog to read only the first 10m of the concatenated file. But what?! Thx Neil |
| |||
| You can not just cat the files together for patently obvious reasons, i.e. each log file has it's own individual header It is trivial to script the process though Paul Watson Tel: +44 1414161772 Mob: +44 7818003457 Web: www.oninit.com GO FURTHER with DB2 GET THERE FASTER with Informix. Attend the IDUG 2006 European Conference. Vienna, Austria. 2-6 October 2006 Visit http://www.iiug.org/conf for more information. > -----Original Message----- > From: Neil Truby [mailto:neil.truby@ardenta.com] > Posted At: 01 September 2006 16:14 > Posted To: comp.databases.informix > Conversation: ontape -l roll-forward of many logs > Subject: ontape -l roll-forward of many logs > > > IDS v7.31 UD8 on solaris > > I'm doing a logical log rollforward. The logs are backed up > by an ontape -a process, to disk, and are about 10m each in size. > > It's all working fine if i roll forward one log then in a > seprate screen move the next one into position. But this is > a pain in the arse: I have hundreds to do and want to do them > in one fell swoop. > > But if I cat all 100 into one large file ontape bombs out > almost immediately asking if I have more logs. Similarly if > I run onlog on the 1concatenation of 100 logs it reads just > the first one and ask me if I have any more. > > Why is this happening? I've changed LTAPESIZE in the > ONCONFIG file on the restored server from 10m to 2g but it's > made no difference. > > SOMETHING is teling ontape/onlog to read only the first 10m > of the concatenated file. But what?! > > Thx > > Neil > > |
| |||
| "Paul Watson" <paul@oninit.com> wrote in message news:09b301c6ce17$acfed7b0$5583390a@arnold... > You can not just cat the files together for patently obvious reasons, > i.e. each log file has it's own individual header > > It is trivial to script the process though Gosh! I think it's far from trivial, because you have to interleave ontape -l's "Do you have another tape?" loop with a loop moving the next log into place each time. If you have a scriptfor it I'll give you a pound. Thanks Neil |
| |||
| You are kidding, of course it's trivial mkfifo /tmp/mypipe chmod 666 /tmp/mypipe ontape -l < /tmp/mypipe > /tmp/ontape.out & Then write a simple awk script that reads the file /tmp/ontape.out via tail -f The only gotcha is under Linux you need to use --pid on the tail -f to ensure the tail closes when the ontape is complete. Paul Watson Tel: +44 1414161772 Mob: +44 7818003457 Web: www.oninit.com GO FURTHER with DB2 GET THERE FASTER with Informix. Attend the IDUG 2006 European Conference. Vienna, Austria. 2-6 October 2006 Visit http://www.iiug.org/conf for more information. > -----Original Message----- > From: Neil Truby [mailto:neil.truby@ardenta.com] > Posted At: 02 September 2006 01:43 > Posted To: comp.databases.informix > Conversation: ontape -l roll-forward of many logs > Subject: Re: ontape -l roll-forward of many logs > > > "Paul Watson" <paul@oninit.com> wrote in message > news:09b301c6ce17$acfed7b0$5583390a@arnold... > > You can not just cat the files together for patently > obvious reasons, > > i.e. each log file has it's own individual header > > > > It is trivial to script the process though > > Gosh! I think it's far from trivial, because you have to > interleave ontape -l's "Do you have another tape?" loop with > a loop moving the next log into place each time. > If you have a scriptfor it I'll give you a pound. > > Thanks > Neil > > |
| |||
| "Paul Watson" <paul@oninit.com> wrote in message news:1e0801c6cea1$4c7db0c0$5583390a@arnold... > You are kidding, of course it's trivial > > mkfifo /tmp/mypipe > chmod 666 /tmp/mypipe > ontape -l < /tmp/mypipe > /tmp/ontape.out & > > Then write a simple awk script that reads the file /tmp/ontape.out via > tail -f Doesn't work for me. The script ends staright away, leaving an zero-length file /tmp/ontape.out (on Solaris). Where do you put the name of the restore file? |
| |||
| What is in the awk script ? Paul Watson Tel: +44 1414161772 Mob: +44 7818003457 Web: www.oninit.com GO FURTHER with DB2 GET THERE FASTER with Informix. Attend the IDUG 2006 European Conference. Vienna, Austria. 2-6 October 2006 Visit http://www.iiug.org/conf for more information. > -----Original Message----- > From: Neil Truby [mailto:neil.truby@ardenta.com] > Posted At: 02 September 2006 14:03 > Posted To: comp.databases.informix > Conversation: ontape -l roll-forward of many logs > Subject: Re: ontape -l roll-forward of many logs > > > "Paul Watson" <paul@oninit.com> wrote in message > news:1e0801c6cea1$4c7db0c0$5583390a@arnold... > > You are kidding, of course it's trivial > > > > mkfifo /tmp/mypipe > > chmod 666 /tmp/mypipe > > ontape -l < /tmp/mypipe > /tmp/ontape.out & > > > > Then write a simple awk script that reads the file > /tmp/ontape.out via > > tail -f > > Doesn't work for me. The script ends staright away, leaving > an zero-length file /tmp/ontape.out (on Solaris). Where do > you put the name of the restore file? > > |
| ||||
| Neil Truby wrote: > "Paul Watson" <paul@oninit.com> wrote in message > news:09b301c6ce17$acfed7b0$5583390a@arnold... > >>You can not just cat the files together for patently obvious reasons, >>i.e. each log file has it's own individual header >> >>It is trivial to script the process though > > > Gosh! I think it's far from trivial, because you have to interleave > ontape -l's "Do you have another tape?" loop with a loop moving the next log > into place each time. > If you have a scriptfor it I'll give you a pound. Get TCL & Expect. Expect is a superlanguage written over TCL (all TCP syntax is available also in Expect scripts) which has a non-procedural syntax specific to responding to prompts from software or hardware. Writing a script to run ontape -l and rename the files as ontape asks for the next one is trivial in Expect. I should have don my eventalarm.c using Expect (TCP and therefore Expect is embedable). Art S. Kagel |