Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Posts
    2

    Lightbulb Unanswered: Can not restore by ontape via here doc

    I use informix7.30UC2 on solaris7 X86.
    I can not restore by ontape via here doc when have more several log tapes. I backup logical log tapes to disk then rename to a unique name
    by script that called by alarm program

    LTAPEDEV /usr/home/dba/DEV/LDEVNAME
    $>ls -l /usr/home/dba/DEV/LDEVNAME
    lrwxrwxrwx 1 dba informix 25 Dec 11 14:49 /usr/home/dba/DEV/LDEVNAME -> /usr/home/dba/JNL/worklog
    $> ls -lt $HOME/JNL
    total 3728
    --rw-rw---- 1 informix informix 0 Feb 10 15:49 worklog
    -rw-rw---- 1 dba informix 376832 Feb 10 15:48 worklog.Mon.15:48
    -rw-rw---- 1 dba informix 163840 Feb 8 10:51 worklog.Sat.10:51
    -rw-rw---- 1 dba informix 212992 Feb 7 15:50 worklog.Fri.15:50
    -rw-rw---- 1 dba informix 294912 Feb 6 15:50 worklog.Thu.15:50
    -rw-rw---- 1 dba informix 655360 Feb 5 15:49 worklog.Wed.15:49

    I would like to develop script restore database because ontape difficult to use by manaully.Then I use here doc to answer the question of ontape. But in case that I have many log tape to restore, here doc can not link file in appropriate time. For example here doc is:
    ontape -r << !
    enter
    y
    y
    enter
    y
    19
    n
    `rm /usr/home/dba/DEV/LDEVNAME`
    `ln -s /usr/home/dba/JNL/worklog.Sat.10:51 /usr/home/dba/DEV/LDEVNAME`
    y
    enter
    `rm /usr/home/dba/DEV/LDEVNAME`
    `ln -s /usr/home/dba/JNL/worklog.Mon.15:48 /usr/home/dba/DEV/LDEVNAME`
    y
    enter
    `rm /usr/home/dba/DEV/LDEVNAME`
    `ln -s /usr/home/dba/JNL/worklog /usr/home/dba/DEV/LDEVNAME`
    y
    enter
    n
    !

    How can I do to develop script restore database (without restore by manually)?. Beside here doc, can I use another method?
    Please recommened me. Thank you for your kindness.

  2. #2
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    534
    I would suggest yuo to look at onbar to do some scripting.
    In that case you program the storage manager. onbar is developed to run as a sccript, ontape is developed to run manually.
    rws

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •