Rocket U2 | UniVerse & UniData

 View Only
  • 1.  Copying distributed files

    Posted 14 days ago
    We have test and production accounts on the same system, which is to say that they reside in different paths on HP-UX.
    When the test account was first created, it was a clone of the production system with adjustments in various places to reflect the different paths.
    But our main files, ORDERS, PAYMENTS, and some others, are distributed files, and the distribution algorithms are equivalent on both test and production, as are the number of partitions.

    So, here are the questions:
    a) Can I refresh the data on test by simply copying the individual data portions from production to test?
    b) I recently fixed one broken file by copying the affected partfile from production to test, but maybe I didn't really.  It seems to work, but maybe I'm missing something.  I don't know for sure.  How can I be sure?
    c) And what about the stub files?  Are there even stub files on UV?  Do they contain the paths in which they were configured?
    d) Where can I find the latest, on-line documentation about this?

    ------------------------------
    Marcus Rhodes
    Owner
    Rocket Forum Shared Account
    ------------------------------


  • 2.  RE: Copying distributed files

    Posted 14 days ago
    a) Can I refresh the data on test by simply copying the individual data portions from production to test?

    Since the number of parts are the same and they "map" to the same numbers, yes.  Just make sure that any indexes are also copied and that the copied part file is pointed to the TEST index location and not the production index location after copying.  You don't want updates to the "copied" part files updating the production indexes.  Always double check to make sure whatever pointers you are using are interfacing with your copies and not the production part files.

    Once copied, use SET.INDEX, VERIFY.DF and LIST.DF to make sure everything looks good.  If needed, you may have to use REBUILD.DF but I don't think that will be needed in your case.


    b) I recently fixed one broken file by copying the affected partfile from production to test, but maybe I didn't really.  It seems to work, but maybe I'm missing something.  I don't know for sure.  How can I be sure?

    SET.INDEX, LIST.DF, VERIFY.DF should show you the parts and indexes for the distributed file.

    c) And what about the stub files?  Are there even stub files on UV?  Do they contain the paths in which they were configured?

    Not entirely sure what you mean by "stub files".  If you mean the file that "defines"  the distributed file, that is a type 27 file that lives under the account that it is created in.  This contains no actual data, it just tells the system what part files define this distributed file (and the algorithm to use).

    d) Where can I find the latest, on-line documentation about this?

    Chapter 6 of the UniVerse system description.
    Rocket Software Documentation




    ------------------------------
    Ryan Ladd
    ------------------------------



  • 3.  RE: Copying distributed files

    ROCKETEER
    Posted 11 days ago
    Hi Marcus, 

    To clarify, are you copying data files (or file parts) at the operating system level?

    ------------------------------
    Mark Sapp
    Senior Software Developer
    Rocket Software
    Lee's Summit, Missouri USA
    ------------------------------



  • 4.  RE: Copying distributed files

    Posted 11 days ago
    That's the the plan, yes.

    ------------------------------
    Marcus Rhodes
    Owner
    Rocket Forum Shared Account
    ------------------------------



  • 5.  RE: Copying distributed files

    ROCKETEER
    Posted 11 days ago
    Marcus,

    FYI, It is possible that if the production data files are being written to while you are copying at the OS level, the copy could get corrupted.   This could be avoided by pausing the database at off-hours or recently in the case of a system that is busy 24/7, you could create Q-pointers to the files and write a program or paragraph to select/copy the records file-by-file within Universe.  

    Not knowing your environment or if you considered this already, just tossing in my 2 cents :-)

    Regards

    ------------------------------
    Mark Sapp
    Senior Software Developer
    Rocket Software
    Lee's Summit, Missouri USA
    ------------------------------



  • 6.  RE: Copying distributed files

    Posted 8 days ago
    Provided you have sufficient disk space the if OS (HPUX?) supports snapshot of the file system(s), would it be feasible to pause the database, snap the filesystem(s), resume the database and then copy the files at OS level? Scripting the pause/snap/resume would likely be over in an acceptably short time.

    ------------------------------
    Peter Cheney
    Rocket Forum Shared Account
    ------------------------------



  • 7.  RE: Copying distributed files

    ROCKETEER
    Posted 8 days ago
    I concur with Peter, noting as a caution when copying database files from one instance to another (whether another machine, or another  location on the same server), then for reliability:
    • The donor location must be quiescent - i.e. database paused or stopped
    • The recipient location must either be new and empty, or it should be verified that the UniVerse instance on the server concerned is not using ANY of the files that are to be replaced. (see 'handle' on Windows or 'fuser -u' on UNIX). 
    My preferred method for a donor system is to stop or pause the database. For a recipient location - if this is not a new copy in a new location - then stop the database and erase any prior copy before dropping in a new one.

    CAUTION: If using Automatic Data Encryption (ADE), please refer to the ADE documentation as specific steps are advised when copying ADE encrypted data to ensure the metadata files are not compromised.

    ------------------------------
    John Jenkins
    Principal Technical Support Engineer
    Rocket Software Limited
    U.K.
    ------------------------------



  • 8.  RE: Copying distributed files

    Posted 6 days ago
    I concur with other answers.  Maybe it was said and I missed it,  be careful with indexes.  True for all files, not just distributed.
    The path to [file]'s coresponding  I_[file] index dir is buried inside the header of the file being indexed.  So if you use OS level tools to copy from prod to dev,  the prod indexes may get updated from dev. 
    SET.INDEX's INFORM option will tell you. 
    SET.INDEX's RELATIVE.PATH option will help you avoid the problem altogether.

    ------------------------------
    Chuck Stevenson
    DBA / SW Developer
    Pomeroy
    San Ignacio US
    ------------------------------