Extending Database Locations

> > Is there anyway to programatically extend a database to another location that
> > has been previously defined?? I am using OpenIngres 1.2/00 and I am trying to
> > create an auto-install for a database application I have. The database is
> > spread over 6 locations for speed purposes. The CREATEDB command will only
> > extend the database to II_DATABASE and II_WORK. I need to then go in by hand
> > and extend the database to Data3, Data4, Data5, & Data6 using the ACCESSDB
> > program. Is there any way to do this from the command line??
> > 
> > Thanks!
> > 
> > -- John Allen

There is an internal procedure that works called iiqef_add_location and can
be called as

execute procedure iiqef_add_location (database_name='dbname',
location_name='location name',
access=8,need_dbdir_flg=1)'

this will extend the database to the required locations.

CA will not support this method but this is what accessdb does.  I found
this method the cleanest and
have used it on Ingres II.

It looks like someone forgot to write an sql command to drive this
procedure.

Con



> Hi John,
> 
>     Unfortunatly there isnt a nice sql command like extenddb or anything eassy
>     like that.  Also the relocatedb command cant be used to extend a database
>     to new locations only to move existing locations. Or at least thats my
>     reading of the manual.
> 
>     Your only remaining option is accessdb. However there are undocumented
>     'record' and 'replay' options in accessdb that literally allow you  to
>     record your keystrokes into a file and then to replay it. With this
>     facility you can do the deed once manually and from then on recall it at
>     will, which should satisfy your batch job requirements. 
> 
>     You HAVE to be carefull in your script to provide the same terminal
>     type to accessdb that you were using when recording the keystrokes.
> 
>     Now if only I could remember the blasted commands. I think it was -I
>     filename to record and -Z filename to replay. I know this method has been
>     mentioned again in the group recently so maybe someone could post those
>     details.
> 
>     Martin Bowes
> 

Hi John,

    Me again,

    I've just played with this issue again - cause I'm bored with a nasty
    script I'm writing at the mo.

    I can confirm that it is accessdb -I to record keystrokes and
    accessdb -Z to replay the keystrokes. Furthermore, the files
    created could be further manipulated via sed/PERL to introduce some
    parameterisation even.

    However, in the case of extending the database I think the method is far
    to prone to error to be usable. The problem is caused by the Database
    Screen in accessdb (OI1.2 version) not having a 'Find' option. Hence you
    cant garuntee that the database you tab onto during the recording will be 
    the same one when you replay. ie 20 tabs/down-arrows now may not be correct
    next time!

    Pisser!

    There are possibilities with config file replacement methods. But I
    wouldnt recommend these, as in this case, they may be far too complicated
    and risky for what youre trying to achieve.

    The last thing I can think of is using finddbs after creating the location
    manually (ie mkdir ..../dbname). However, in 6+ years of DBA-ing I've
    never actually used that command. I wouldnt do that until I'd tested it
    on a spare installation of no importance. ie. the command could really
    screw iidbdb.

    Martin Bowes
Ingres Q & A
Back to William's Home Page

© William Yuan 2000

Email William