Removing Database Locations

> I'm using INGRES 6.4/06 on HPUX 10.20 ACE.
> 
> Yes, yes, I know "technically" you cannot
> remove locations once they're added via accessdb
> 
> ... BUT ...
> 
> Has anyone successfully removed location information ...
> via hacking or any other method?  I imagine all
> it would take is removing the relative information
> from the iidbdb.
> 
> If this is dangerous ... why?
> 
> Thanks,
> 
> Chris
> 
From majordom@e-math.ams.org  Thu Feb 12 09:31:34 1998

Hi Chris,

    I'm assuming that you are not talking about II_DATABASE itself but just an
    ordinary secondary data location.

    As long as no database uses the location then yes you can hack iidbdb's
    catalog iilocations (use the +Y flag). That should be fairly safe but I've
    never actually tried it.

    If any database uses the site then this is very dangerous. The problem
    lies in the data locations used by the database being recorded not just in
    catalog iiextend but as hardcoded paths in the configuration file of the
    database. I suspect that if you removed the location that any subsequent
    checkpoint would fail.

    I've never done this but I suspect that if you do have a databases(s)
    spread onto this location what you could do is:
    1. Binary Unload the databases on this location.
    2. Destroy the databases
    3. Remove the location from iidbdbs iilocation catalog.
    3. Recreate the databases, reload users, spread to all the desired
       locations.
    4. Then in each of the copyin files prepared by the unloaddb run 
        replace any reference to the old location with whatever other data
        location seems acceptable.
    5. Now reload the databases.
    6. Checkpoint turning journaling on.

    Changing II_DATABASE is a lot more fun! That is if in your opinion fun
    consists of smearing your testicals in fish paste and dangling them in a
    pool of Piranahs.

    The DBA Guide covers this task, and as it involves a new run of iibuild
    I'll leave that to the manual.

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

© William Yuan 2000

Email William